Adding Partitions to AWS Glue Catalog in Athena
A data engineer creates an AWS Glue Data Catalog table by using an AWS Glue crawler that is named Orders. The data engineer wants to add the following new partitions: s3://transactions/orders/order_date=2023-01-01 s3://transactions/orders/order_date=2023-01-02 The data engineer must edit the metadata to include the new partitions in the table without scanning all the folders and files in the location of the table. Which data definition language (DDL) statement should the data engineer use in Amazon Athena?
Community Votes
100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The exam trap is confusing manual partition addition with automated repair commands; MSCK REPAIR TABLE scans all folders, violating the constraint to avoid scanning.
This question tests the correct DDL syntax for manually adding specific partitions to an Amazon Athena table without triggering a full scan, leveraging the ALTER TABLE ADD PARTITION command.
Learners often select MSCK REPAIR TABLE because it is commonly used to sync Glue Catalog changes, but it ignores the explicit requirement to avoid scanning all files.
Community Discussion (4 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
To add specific partitions to an Amazon Athena table backed by an AWS Glue Data Catalog without scanning the entire S3 location, the data engineer must use theALTER TABLE... ADD PARTITION statement. Option A correctly uses this DDL syntax, specifying the partition key-value pair and the exact S3 location. This approach is efficient and directly meets the requirement to update metadata for only the new dates.Why the Other Options Are Wrong
Option B (MSCK REPAIR TABLE) is incorrect because it instructs Athena to scan the entire directory structure to discover missing partitions, which violates the constraint of not scanning all folders. Option C (REPAIR TABLE) is not a valid DDL command in Amazon Athena. Option D (MODIFY PARTITION) is syntactically invalid for adding new partitions; MODIFY is typically used to change properties of existing partitions, not create them, and the location path in D is also malformed relative to the partition key.Community Comment Notes
Community consensus strongly supports Option A, with multiple users citing the official AWS documentation forALTER TABLE ADD PARTITION. Comments highlight that MSCK REPAIR TABLE is inefficient for targeted updates and that REPAIR TABLE is invalid syntax. One user noted that Option D modifies rather than adds, reinforcing why A is the only viable choice for creating new entries. Official Reference
Exam Strategy
When a question specifies 'without scanning', immediately eliminate MSCK REPAIR TABLE. Look for explicit ALTER TABLE ADD PARTITION statements that match the required partition keys and locations.
Frequently Asked Questions
Why is MSCK REPAIR TABLE wrong here?
MSCK REPAIR TABLE scans the entire S3 prefix to find missing partitions, which violates the requirement to avoid scanning all folders.
What is the difference between ADD and MODIFY PARTITION?
ADD creates a new partition entry in the catalog, while MODIFY updates properties of an existing partition. You cannot modify a non-existent partition.
Related Analysis
Practice All DEA-C01 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DEA-C01 Practice Test →