nerdexam
Amazon

DEA-C01 · Question #91

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…

The correct answer is A. ALTER TABLE Orders ADD PARTITION(order_date='2023-01-01') LOCATION. ALTER TABLE ... ADD PARTITION explicitly registers a specific partition path in the Glue Data Catalog metadata without triggering any S3 file scan. You specify both the partition key value and its S3 LOCATION directly. Option B (MSCK REPAIR TABLE) works by scanning all folders…

Data Store Management

Question

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?

Options

  • AALTER TABLE Orders ADD PARTITION(order_date='2023-01-01') LOCATION
  • BMSCK REPAIR TABLE Orders;
  • CREPAIR TABLE Orders;
  • DALTER TABLE Orders MODIFY PARTITION(order_date='2023-01-01') LOCATION

How the community answered

(46 responses)
  • A
    74% (34)
  • B
    7% (3)
  • C
    15% (7)
  • D
    4% (2)

Explanation

ALTER TABLE ... ADD PARTITION explicitly registers a specific partition path in the Glue Data Catalog metadata without triggering any S3 file scan. You specify both the partition key value and its S3 LOCATION directly. Option B (MSCK REPAIR TABLE) works by scanning all folders under the table's S3 location to discover and register missing partitions - exactly what the engineer wants to avoid. Option C (REPAIR TABLE) is not valid syntax in Athena. Option D (ALTER TABLE MODIFY PARTITION) is used to change an existing partition's location, not to add a new one.

Topics

#AWS Glue Data Catalog#Amazon Athena#Partition Management#DDL

Community Discussion

No community discussion yet for this question.

Full DEA-C01 Practice