Skip to content

AWS Athena show only first row of each tables

0

Hello, I have data in the AWS S3 bucket in the format year/month/day/hour/file1.json, file2.json..... file6.json.

In the JSON file, the data are not separated by coma or new line. {"key":"value1"}{"key":"value2"}{"key":"value3"}.... I use AWS Glue Crawler and get a partitioned table. But when I look at this table in the Athena, I see only the first object from each file (from each folder {"key":"value1"}). I understood that the problem with the JSON files. How do I change it with ETL Job or with Lambda?

Thank you!

asked 2 years ago524 views

1 Answer
0

The reason is that json records were being written to S3 bucket without next line character: '\n'. Make sure your json records are written with '\n' appended at the end.

AWS
SUPPORT ENGINEER

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.