Try a sample question
This is an original sample question written by itmoshi based on the exam objectives.
New CSV files land under an S3 prefix every day, and existing files are never overwritten. A company transforms them once a day with an ETL job created in AWS Glue Studio. The script reads from S3 as a DynamicFrame (with transformation_ctx set) and calls job.init and job.commit, but job bookmarks are still disabled. As a result, each run rereads every file under the prefix, which produces duplicates in the output. With minimal code changes, the company wants future runs to process only the files added since the last successful run. What should it do?
- ARun the AWS Glue crawler more often so the Data Catalog table is always up to date
- BEnable job bookmarks so that Glue tracks the data it has already processed
- CEnable versioning on the S3 bucket so that only new object versions are read
- DAdd more workers to the job so that reprocessing all files finishes faster
Show answer and explanation
Answer:B To process only files added since the last successful run, enable Glue job bookmarks.
Why it is correct
With job bookmarks enabled, Glue saves state about which files were processed when job.commit runs, and later runs skip files that have not changed since. The script already meets the bookmark prerequisites (DynamicFrame, transformation_ctx, job.init and job.commit), so only the job setting needs to change. Once the first run after enabling bookmarks completes successfully, subsequent runs process only new files. Duplicates already written to the output are not removed automatically and need a separate cleanup.
The other options
- ✗ A A crawler discovers schemas and partitions and updates the Data Catalog; it does not track which data has been processed. Use it to reflect new columns or partitions in the catalog.
- ✗ C Versioning keeps previous versions of objects under the same key and does not change which files the job reads. Use it to recover from accidental deletes or overwrites.
- ✗ D More workers can raise throughput when there are enough parallel tasks, but they do not change which files are read, so every file is still reprocessed and the duplicates remain. Use this when the job cannot keep up with the data volume.
Key takeaway
Incremental processing → job bookmarks. Schema and partition discovery → crawlers. Speed → number and type of workers. Protection against accidental deletes → S3 versioning.
Try 32 questions like this for free
itmoshi is an unofficial study service and is not affiliated with AWS or any exam provider.