Sample questions with answers and explanations
Question 1
A data engineer must choose a file format for an analytics data lake where queries read only a few columns from wide tables. Which format reduces scanned data the MOST?
- CSV with gzip
- JSON lines
- Plain text logs
- Apache Parquet — Correct
Correct answer
Apache Parquet
Explanation
Parquet is columnar, so queries read only needed columns, and it compresses well. CSV, JSON, and text are row-based and require reading full rows.
Question 2
A company receives daily files from partners over SFTP and wants them stored directly in S3 without managing servers. Which service fits BEST?
- AWS DataSync with an on-premises agent
- Amazon AppFlow with an SFTP connector
- Amazon EC2 running an SFTP daemon
- AWS Transfer Family with S3 storage — Correct
Correct answer
AWS Transfer Family with S3 storage
Explanation
Transfer Family provides managed SFTP endpoints backed by S3. AppFlow connects to SaaS apps. DataSync needs agents at the source. An EC2 SFTP server requires management.
Question 3
A data engineer must design a pipeline whose output must be reproducible for audits months later. Which practice fits BEST?
- Delete intermediate and raw data immediately after each pipeline run
- Change transformation code directly in production without version control
- Overwrite the raw data with transformed data after each run to save space
- Keep immutable raw data and versioned code, and use table snapshots — Correct
Correct answer
Keep immutable raw data and versioned code, and use table snapshots
Explanation
Immutable inputs, versioned code, and snapshots allow results to be reproduced. Overwriting raw data, unversioned changes, and deleting inputs prevent reproduction.
Question 4
A data engineer must load data into Amazon Redshift from S3 every hour. Sometimes a load fails because of malformed rows. The team wants to load the good rows and capture the bad rows for review. Which COPY option helps?
- NOLOAD, which loads only the rows that are valid into the target table
- TRUNCATECOLUMNS, which moves bad rows into a separate error table
- MAXERROR with review of the STL_LOAD_ERRORS or SYS_LOAD_ERROR_DETAIL view — Correct
- MANIFEST, which automatically repairs malformed rows during loading
Correct answer
MAXERROR with review of the STL_LOAD_ERRORS or SYS_LOAD_ERROR_DETAIL view
Explanation
MAXERROR allows a number of bad rows, and load error views show the details. NOLOAD validates without loading. TRUNCATECOLUMNS truncates long values. MANIFEST lists files to load.
Question 5
A company wants business analysts to clean and normalize data visually, such as removing duplicates and standardizing date formats, without writing code. Which service fits BEST?
- AWS Glue DataBrew recipes — Correct
- Amazon Redshift stored procedures
- AWS Lambda with Python scripts
- Amazon EMR with Spark notebooks
Correct answer
AWS Glue DataBrew recipes
Explanation
DataBrew provides a visual interface with hundreds of transformations without code. EMR, Lambda, and stored procedures require code.