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?
- AALTER 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β; (correct answer)
- BMSCK REPAIR TABLE Orders;
- CREPAIR TABLE Orders;
- DALTER 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β;
Reveal answer & explanationHide answer
The correct answer is A. Option 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_d...
Explanation
Amazon S3 provides durable, scalable object storage that is fully managed.