Athena Query Performance with AWS Glue Crawler Exclusions
A data engineer is using an AWS Glue crawler to catalog data that is in an Amazon S3 bucket. The S3 bucket contains both .csv and json files. The data engineer configured the crawler to exclude the .json files from the catalog. When the data engineer runs queries in Amazon Athena, the queries also process the excluded .json files. The data engineer wants to resolve this issue. The data engineer needs a solution that will not affect access requirements for the .csv files in the source S3 bucket. Which solution will meet this requirement with the SHORTEST query times?
Community Votes
100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The core concept is that Athena ignores Glue crawler exclusion patterns, making physical relocation of files the only effective optimization method.
This page explains how to resolve discrepancies between AWS Glue crawler exclusions and Amazon Athena query scans to achieve the shortest query times for mixed-format S3 data.
Most candidates incorrectly assume that adjusting AWS Glue crawler settings or modifying Athena query logic will prevent the scanning of excluded file types.
Community Discussion (3 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Amazon Athena queries the underlying Amazon S3 data directly and does not respect the exclusion patterns configured in an AWS Glue crawler; it processes all files matching the table's location. Relocating the.json files to a different S3 path effectively removes them from the table's scope, ensuring Athena only scans the desired.csv files. This approach minimizes I/O overhead and results in the shortest possible query execution time.Why the Other Options Are Wrong
Adjusting the AWS Glue crawler settings (Option A) only affects metadata registration in the Data Catalog, not the actual data scanned by Athena. Modifying Athena queries (Option B) to filter out specific file types is inefficient because Athena must still read and parse the entire dataset before applying filters. Using S3 bucket policies (Option D) would block access entirely, which violates the requirement to maintain access to the.csv files.Community Comment Notes
As noted by user teo2157, "Athena does not recognize exclude patterns that you specify an AWS Glue crawler," confirming that physical separation is required. Another commenter highlighted that while query adjustments are feasible, relocating files yields the best performance, aligning with the exam's focus on efficiency.Official Reference
Exam Strategy
Always prioritize data locality when optimizing query performance in Athena. If metadata configurations fail to restrict data processing, physically separate the unwanted data from the source path.
Frequently Asked Questions
Does AWS Glue crawler exclusion affect Amazon Athena?
No. Athena scans all files in the table location regardless of Glue crawler exclusion patterns.
Can I use SQL to ignore .json files in Athena?
You can filter rows via SQL, but Athena still reads the files, causing higher latency than relocating them.
Related Analysis
Practice All DEA-C01 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DEA-C01 Practice Test →