0

I have a CSV file uploaded to an S3 bucket. I want to return rows that match a substring of a field Display. What's the right SELECT syntax?

This returns 0 rows:

"select * from s3object s where 'substring' in s.Display LIMIT 100"

Thanks for your help!

TrickiDicki
  • 143
  • 2
  • 13

2 Answers2

2

Found the answer:

"select * from s3object s where s.Display LIKE '%substring%' LIMIT 100"

More info... S3 Select uses Amazon Athena which uses Presto as it's query engine.

TrickiDicki
  • 143
  • 2
  • 13
0

Worth noting that "SELECT * FROM s3object s WHERE 'substring' IN s.Display would only work if s.Display was an ARRAY.

slajma
  • 1,609
  • 15
  • 17