Explore / AWS Certified Data Engineer - Associate (DEA-C01) Exam Prep / Practice questions
AWS Certified Data Engineer - Associate (DEA-C01) practice questions
10 questions from the bank behind this course's timed mock. Free to read and to answer, no account needed, and each has its answer and an explanation. They belong to AWS Certified Data Engineer - Associate (DEA-C01) Exam Prep.
Answer them one at a time →Read lesson 1 free
Question 1
A data engineer must run a short data-cleaning job once each night. The team has no staff available to patch or maintain servers. Which solution meets these requirements with the LEAST operational overhead?
- Run the job on a fully managed, serverless service that is started by a managed schedule each night.
- Run the job on a self-managed server in the team's own data center and upload the results each night.
- Run the job on a fleet of Amazon EC2 instances that the team installs, patches and starts with a cron entry.
- Run the job on a continuously running streaming pipeline that processes each record in near real time.
Show the answer
Answer: A. Run the job on a fully managed, serverless service that is started by a managed schedule each night.
A fully managed, serverless option on a schedule meets the nightly, short-job and no-patching requirements and ranks best on LEAST operational overhead. The Amazon EC2 fleet would work technically, but the team would have to install and patch it, so it fails the constraint.
Question 2
A data engineer runs a nightly AWS Glue Spark job that reads CSV files from an Amazon S3 location through a Data Catalog table. The job parameter `--job-bookmark-option` is set to `job-bookmark-enable`, and the script calls `job.init()` at the start. Every run still reprocesses all of the files from earlier nights. Which TWO changes are required for the bookmark to track processed data? (Select TWO.)
More than one answer is right.
- Set `groupFiles` to `inPartition` on the source
- Add a `transformation_ctx` to the source that reads the catalog table
- Call `job.commit()` at the end of the script
- Run `aws glue reset-job-bookmark` before each nightly run
- Set `--job-bookmark-option` to `job-bookmark-pause`
Show the answer
Answers: B. Add a `transformation_ctx` to the source that reads the catalog table; C. Call `job.commit()` at the end of the script
Glue stores bookmark state under the source's `transformation_ctx` name and saves that state only when `job.commit()` runs, so both are needed alongside `job-bookmark-enable`. Resetting the bookmark before each run does the opposite of what is wanted: it clears the state so that everything is reprocessed.
Question 3
A data engineer must convert a 200 GB CSV dataset in Amazon S3 to Apache Parquet once. The dataset is already registered as a table in the AWS Glue Data Catalog, and the team knows only SQL. Which solution meets these requirements with the LEAST operational overhead?
- Run an Amazon Athena CTAS statement with format = 'PARQUET' and an empty external_location
- Run an Amazon Athena INSERT INTO statement that appends the rows to the existing CSV table with write_compression = 'SNAPPY'
- Write an AWS Glue PySpark job that reads the table into a DynamicFrame and writes it with format="parquet"
- Create an Amazon Data Firehose stream with record format conversion and replay the CSV files through it
Show the answer
Answer: A. Run an Amazon Athena CTAS statement with format = 'PARQUET' and an empty external_location
Athena CTAS writes the Parquet files and registers the new table in one SQL statement, with no job or infrastructure to manage. An AWS Glue job also works but requires PySpark code and job configuration, which is more overhead for a one-off conversion.
Question 4
A data engineer runs a PySpark job on Amazon EMR. The job reads 400 GB of Apache Parquet data from Amazon S3, transforms it, calls collect() on the result, and then loops over the returned rows in Python to write them to Amazon S3. The job fails with an out-of-memory error on the driver. Adding more worker nodes does not help. Which change is the best fix?
- Double the number of executors again so that more tasks can run at the same time
- Rewrite the PySpark script in Scala so that the code runs inside the JVM alongside Spark
- Raise spark.sql.shuffle.partitions from 200 to 2,000 so that each shuffle partition holds fewer rows
- Remove the collect() call and write the DataFrame to Amazon S3 with Spark's DataFrame writer, so the executors write the partitions in parallel
Show the answer
Answer: D. Remove the collect() call and write the DataFrame to Amazon S3 with Spark's DataFrame writer, so the executors write the partitions in parallel
collect() pulls every row to the single driver, which runs out of memory however many executors exist, so the fix is to keep the data on the executors and let them write in parallel. More shuffle partitions make each executor task smaller, but all rows still end up on the driver.
Question 5
A data engineer runs two nightly jobs against the same Amazon Redshift table. Job A runs a COPY that loads new rows into the table. Job B starts an INSERT into the same table while the COPY is still running. Analysts also run SELECT queries on the table throughout the load. Which behavior should the engineer expect?
- The INSERT waits until the COPY transaction finishes, while the SELECT queries continue to run against a snapshot of committed data.
- The INSERT and the SELECT queries all wait until the COPY transaction finishes, because COPY takes an AccessExclusiveLock.
- The INSERT runs concurrently with the COPY because Redshift takes row-level locks, and only the SELECT queries wait.
- The INSERT fails immediately with a lock error and must be resubmitted after the COPY commits.
Show the answer
Answer: A. The INSERT waits until the COPY transaction finishes, while the SELECT queries continue to run against a snapshot of committed data.
COPY and INSERT both acquire a ShareRowExclusiveLock, which blocks other ShareRowExclusiveLock attempts, so the second write queues while readers still see committed data. COPY does not take an AccessExclusiveLock; that lock comes mainly from DDL and the explicit LOCK command, and it is the one that would block reads.
Question 6
A data engineer runs an AWS Glue crawler nightly against an Amazon S3 prefix that receives one new Hive-style date folder each day. To shorten run time, the engineer changes the crawler's recrawl behavior to crawl new sub-folders only. A week later, an upstream team deletes several old date folders and rewrites the files in one existing folder with an added column. What will the crawler do on its next run?
- Add partitions for new folders and mark the partitions for the deleted folders as deprecated in the Data Catalog
- Add partitions for any new folders only; it will not detect the deleted folders or the schema change in the existing folder
- Add partitions for new folders and update the table schema with the added column, but leave the deleted partitions in place
- Fail the run because the incremental crawl detects that existing folders no longer match the Data Catalog
Show the answer
Answer: B. Add partitions for any new folders only; it will not detect the deleted folders or the schema change in the existing folder
Crawling new sub-folders only is an incremental crawl that adds new partitions, forces update and delete behavior to LOG, and does not detect changes to or deletions of existing partitions. Deprecating the deleted partitions would require a full crawl with DeleteBehavior set to DEPRECATE_IN_DATABASE, which the incremental mode overrides.
Question 7
A data engineer maintains a curated table in the AWS Glue Data Catalog. Column names and comments on the table were edited by hand and must not be overwritten. An AWS Glue crawler runs nightly over the Amazon S3 source, and upstream teams occasionally add new fields that analysts need to query. Which crawler configuration meets these requirements with the LEAST operational effort?
- Keep the default behaviour, which updates the table definition to match the source
- Set the crawler to update all new and existing partitions with metadata from the table (InheritFromTable)
- Set the crawler to ignore the change and not update the table (UpdateBehavior=LOG)
- Set the crawler to add new columns only (MergeNewColumns)
Show the answer
Answer: D. Set the crawler to add new columns only (MergeNewColumns)
MergeNewColumns keeps the existing column definitions and appends newly detected columns, so the curated edits survive and the new fields become queryable. UpdateBehavior=LOG also protects the table, but it only logs the change, so the new fields would never appear in the catalog.
Question 8
A data engineer must build a report from the table daily_sales (sale_date, region, amount) that returns one row per sale_date with one column each for the regions EU and US. The same SQL must run unchanged in Amazon Athena and Amazon Redshift, and a date with no sales for a region must show 0 rather than NULL. Which query meets these requirements?
- SELECT sale_date, SUM(CASE WHEN region = 'EU' THEN amount ELSE 0 END) AS eu, SUM(CASE WHEN region = 'US' THEN amount ELSE 0 END) AS us FROM daily_sales GROUP BY sale_date
- SELECT sale_date, SUM(CASE WHEN region = 'EU' THEN amount END) AS eu, SUM(CASE WHEN region = 'US' THEN amount END) AS us FROM daily_sales GROUP BY sale_date
- SELECT * FROM (SELECT sale_date, region, amount FROM daily_sales) PIVOT (SUM(amount) FOR region IN ('EU', 'US'))
- SELECT sale_date, region, SUM(amount) AS total FROM daily_sales GROUP BY sale_date, region
Show the answer
Answer: A. SELECT sale_date, SUM(CASE WHEN region = 'EU' THEN amount ELSE 0 END) AS eu, SUM(CASE WHEN region = 'US' THEN amount ELSE 0 END) AS us FROM daily_sales GROUP BY sale_date
Conditional aggregation with ELSE 0 pivots in both engines and returns 0 for a missing date and region combination. The same query without ELSE 0 returns NULL for that combination, and the PIVOT operator is not available in Athena SQL.
Question 9
A data engineer runs an AWS Glue ETL job that loads payment records into a finance reporting table. The job includes an Evaluate Data Quality transform. If any rule fails, no data from that run may reach any target. Which configuration meets this requirement, and what is its consequence?
- Choose "Fail job without loading to target data". The job fails immediately and the data quality results are not written to a target either.
- Leave "On ruleset failure" at None and publish metrics to Amazon CloudWatch. The job stops when a rule fails.
- Choose the "Data quality results" output. The ruleOutcomes node blocks the load when a rule fails.
- Choose "Fail job after loading data to target" and set an Amazon S3 result location. The job fails before any target is written.
Show the answer
Answer: A. Choose "Fail job without loading to target data". The job fails immediately and the data quality results are not written to a target either.
"Fail job without loading to target data" stops the run immediately and loads nothing to any target, including the data quality results. "Fail job after loading data to target" marks the run failed only after the load step, so bad data has already reached the target.
Question 10
A data engineer registers an S3 location with AWS Lake Formation, revokes Super from IAMAllowedPrincipals, and grants an analyst role SELECT on four columns of a table. Amazon Athena queries by the role correctly return only those four columns. A security review then finds that the same role can download the complete underlying Parquet files with the AWS CLI. What is the correct fix?
- Revoke DATA_LOCATION_ACCESS on the registered location from the analyst role
- Replace the column-level grant with a data filter that excludes the restricted columns
- Remove lakeformation:GetDataAccess from the analyst role's IAM policy
- Remove the IAM policy and bucket policy statements that allow the role s3:GetObject on the data location
Show the answer
Answer: D. Remove the IAM policy and bucket policy statements that allow the role s3:GetObject on the data location
Lake Formation does not block direct S3 API access that IAM or a bucket policy already allows, so those paths must be removed; with a registered location the role needs no s3:GetObject of its own. Revoking DATA_LOCATION_ACCESS is wrong because it only controls who can create Data Catalog resources that point to the location, not who can read the objects.
The full timed mock
65 questions in 130 minutes, with a pass mark of 72%. Each paper is drawn from a bank of questions written for the mock alone, and these 10 are left out of it. Full access opens it, with every level of the course.
LevelUpWith is independent of the organisation that sets this exam. These questions were written for this course; they are not taken from the exam.