AWS Data Engineer DEA-C01 · Data Ingestion and Transformation · medium

An AWS Glue PySpark ETL job runs every hour to process newly arrived CSV files in an Amazon S3 bucket (s3://raw-sales/2026/). Without moving or deleting the source S3 files, how can you ensure each hourly Glue job run processes ONLY the new S3 files added since the previous successful run?

Published · Last updated · checked before publication — how we verify questions

Options

  • AEnable AWS Glue Job Bookmarks with transformation_ctx on S3Correct answer
  • BIncrease the number of Glue G.2X workers from 10 to 40 on each run
  • CSwitch the Glue job language from PySpark to Scala without bookmarks
  • DEnable Amazon S3 Transfer Acceleration on the raw-sales S3 bucket

Answer: A. Enable AWS Glue Job Bookmarks with transformation_ctx on S3

AWS Glue job bookmarks let a job remember what it has already processed between runs, so each scheduled run picks up only new data. For an Amazon S3 source, Glue records the objects it has read, using their keys and last-modified timestamps, and stores that state with the job. To use it, set the job parameter --job-bookmark-option to job-bookmark-enable, call job.init() and job.commit() in the script, and give each source a unique transformation_ctx. Without transformation_ctx the bookmark has no handle to track state for that source. Because the state is kept by Glue, the source files can stay in place, which is exactly what the question requires. The state only advances when the run commits successfully, so a failed run is reprocessed on the next attempt. A common trap is enabling the bookmark option on the job but forgetting transformation_ctx, or assuming that scaling up or changing language alters what data gets read.

Why the other options are wrong

  • B. Increase the number of Glue G.2X workers from 10 to 40 on each run — Raising the worker count from 10 to 40 G.2X workers only adds parallel compute capacity, so the job finishes faster. It has no effect on which S3 objects are selected, so every run would still read all the files.
  • C. Switch the Glue job language from PySpark to Scala without bookmarks — PySpark and Scala are two language options for the same Glue Spark runtime, and neither one tracks previously processed files on its own. Without bookmarks, a Scala job would reread all the files in the prefix on every run just as the PySpark job does.
  • D. Enable Amazon S3 Transfer Acceleration on the raw-sales S3 bucket — S3 Transfer Acceleration speeds up long-distance uploads into a bucket by routing them through AWS edge locations. It is a transfer-performance feature that does not track ETL state or filter which objects a Glue job reads.

All Data Ingestion and Transformation 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.