2
votes

I have already read the answers under the question AWS Athena Returning Zero Records from Tables Created from GLUE Crawler input csv from S3

and the question https://aws.amazon.com/de/premiumsupport/knowledge-center/athena-empty-results/

As advised

  1. I have given the folder path in S3 instead of the file name to the Glue crawler.
  2. I have deleted and recreated the crawler

But it didnĀ“t help

my case:

sample data from csv in s3 storage: enter image description here

Cloud Watch Log show the glue table is successfully created:enter image description here

the schema structure looks like:enter image description here

Sizekey 333 matched the csv data size:Data Size: 333 Bytes

But when I run the Athena query, I got the result:Data scanned 0 KB

Only the columns are returned, no records returned. Data scanned: 0 KB

Anyone has an idea why the glue crawler can not transform the data?

Thanks!

1

1 Answers

5
votes

After looking at the table names generated it looks like you have multiple files with different schemas in the folder path that you have passed to Glue crawler. If you want these tables to be queried in Athena then you have to place these CSV files with different schema in different folders.

Although you passed folder path to Glue crawler it creates tables with full file path for Athena tables.You can verify the same by running show create table <table-name>.