QuestionQ106

VerifiedData Store Management

A company stores objects in an Amazon S3 bucket. The company crawls the objects so that Amazon Athena can query the data.

A data engineer manually moved all objects from the partition with a path prefix of status=01 to the prefix status=02. The status=01 partition location is now empty. However, the status=01 partition location still appears in the AWS Glue Data Catalog metadata.

Which Athena command should the data engineer run to resolve the metadata discrepancy?

Explanation

MSCK REPAIR TABLE only adds partitions for new prefixes found in Amazon S3; it does not remove Data Catalog entries for prefixes that no longer contain data. Since the status=01 location is now empty, the stale partition must be explicitly removed with ALTER TABLE DROP PARTITION so Athena queries no longer reference it. Learn more: Athena partition management

Community Discussion

No comments yet. Be the first to start the discussion!