aws-samples / aws-glue-samples

AWS Glue code samples
MIT No Attribution
1.44k stars 820 forks source link

Tables created using join_and_relationalize.md example not showing any data #22

Closed rbhogi closed 3 years ago

rbhogi commented 6 years ago

As per https://github.com/aws-samples/aws-glue-samples/blob/master/examples/join_and_relationalize.md example, created a crawler with s3://awsglue-datasets/examples/us-legislators. Crawler ran successfully created tables in the database. When I try to retrieve the data from these tables using Athena, I am seeing "Zero records returned." message. More info (Crawler name:aws-glue-samples-raja0505, region:us-east-2)

persons_json memberships_json organizations_json events_json areas_json countries_r_json

tejamuddada commented 6 years ago

which json files added to glue to create crawler .Do we need to add all the json files or only some specific files to create a crawler as per example i am unable to follow which json files needs to be added to s3 to create crawler.

asaushkin commented 4 years ago

I am stuck with the same thing. Tables were inferred without any problem, but when I query it with Athena it shows empty result

image

moomindani commented 3 years ago

It is because that the location of those tables is not the folder path, it points specific file under the same folder. Athena does not support reading from such kind of tables although Glue ETL can read them.

If you want Athena to read those tables, you can move each file to separate folder and run Glue crawler for each path, or you can just read from Glue ETL and write into separate locations and populate table definition from the job. https://docs.aws.amazon.com/glue/latest/dg/update-from-job.html