Skip to content
Advertisement

Amazon Athena set location to single csv file

I would like to set the location value in my Athena SQL create table statement to a single CSV file as I do not want to query every file in the path. I can set and successfully query an s3 directory (object) path and all files in that path, but not a single file. Is setting a single file as the location supported?

Successfully queries CSV files in path:

Returns zero results:

Create table statement:

I have read this Q&A and this, but it doesn’t seem to address the same issue.

Thank you.

Advertisement

Answer

You could try adding path of that particular object in WHERE condition while querying:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement