
Explanation:
MSCK REPAIR TABLE will scan all folders and files in the table's location to add new partitions, which does not meet the requirement of avoiding scans. The ALTER TABLE ADD PARTITION statement directly adds partition metadata without scanning the underlying storage.
Ultimate access to all questions.
Question 24
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:
A
ALTER TABLE Orders ADD PARTITION(order_date='2023-01-01') LOCATION 's3://transactions/orders/order_date=2023-01-01'; ALTER TABLE Orders ADD PARTITION(order_date='2023-01-02') LOCATION 's3://transactions/orders/order_date=2023-01-02';
B
MSCK REPAIR TABLE Orders;
C
REPAIR TABLE Orders;
D
ALTER TABLE Orders MODIFY PARTITION(order_date='2023-01-01') LOCATION 's3://transactions/orders/2023-01-01'; ALTER TABLE Orders MODIFY PARTITION(order_date='2023-01-02') LOCATION 's3://transactions/orders/2023-01-02';
No comments yet.