AWS Data Engineer DEA-C01 · Data Operations and Support · medium
To ensure a daily batch pipeline writing to s3://curated/sales/dt=2026-10-28/ is idempotent (so re-running the job for 2026-10-28 after a partial failure never produces duplicate sales rows), which write strategy should the PySpark job use?
Published · Last updated · checked before publication — how we verify questions
Options
Answer: D. Dynamic partition overwrite or Iceberg MERGE on the partition
Writing with dynamic partition overwrite (SaveMode.Overwrite scoped to partitionOverwriteMode = dynamic or an Iceberg INSERT OVERWRITE / MERGE INTO on the target dt=2026-10-28 partition) atomically replaces only that day's partition output on retry, guaranteeing idempotency without duplicating rows.
Why the other options are wrong
- A. SaveMode.Append with random UUID filenames on retry attempts — Appending new files on retry without clearing the previous attempt's files duplicates every row in the partition.
- B. SaveMode.Ignore so retries skip writing when a folder exists — SaveMode.Ignore leaves partial or corrupted output untouched if the directory already exists.
- C. Overwriting the root S3 bucket across 5 years of history — Static overwrite at the root table path deletes all historical partitions when writing a single day.
More Data Operations and Support questions
- An AWS Lambda function processes batches of 100 records from an Amazon Kinesis Data Stream. Occasionally, a single…
- An AWS Glue PySpark job joins a 2 TB FactClicks dataset with a 50 GB DimCampaigns dataset on campaign_id. In the Spark…
- An AWS Glue job fails intermittently when an upstream third-party REST API returns HTTP 503 Service Unavailable. You…
- You want to enforce automated data quality checks inside an AWS Glue ETL pipeline so that if Completeness…
- An Amazon S3 table is partitioned by date (s3://logs/dt=2026-01-01/, dt=2026-01-02/, etc.) across 10 years (3,650…
- Multiple business-intelligence analysts run ad-hoc queries in Amazon Athena, and one analyst accidentally executes a…
All Data Operations and Support questions and the topic overview →
AWS and Amazon Web Services are trademarks of Amazon.com, Inc. PrepIQ Hub is not affiliated with, endorsed by, or sponsored by Amazon Web Services.