A data engineer configured an AWS Glue crawler to catalog data in an S3 bucket that contains both .csv and .json files. The crawler was set to exclude the .json files, but when running Athena queries the .json files are still being processed. The engineer must fix this without changing access to the .csv files and wants the shortest possible query times. What is the best solution?
Choose an answer
Tap an option to check your answer.
Correct answer: Relocate the .json files to a different path within the S3 bucket..
Why this is the answer
Relocating the .json files to a different S3 path is the most effective solution because Athena queries scan all data within the table's defined S3 location. Even if a Glue crawler excludes files, Athena will still process them if they reside in the same prefix as the cataloged data, leading to increased query times and costs. Moving the .json files ensures Athena only scans the relevant .csv data. Adjusting crawler settings is incorrect because the crawler's exclusion only affects metadata cataloging, not Athena's scan behavior. Using the Athena console to exclude files would require modifying every query, which is not efficient for shortest query times. Using S3 bucket policies to block access would prevent Athena from reading the .json files but would also block access to the .csv files if applied broadly, or require complex policies that don't directly optimize query performance by reducing scan size.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed