Question 1
Which COPY INTO statement loads JSON files and allows new columns in the files to be added to the target table schema?
- COPY INTO t FROM '/Volumes/raw/app/events' FILEFORMAT = JSON FORMAT_OPTIONS ('addNewColumns' = 'true')
- COPY INTO t FROM '/Volumes/raw/app/events' FILEFORMAT = JSON COPY_OPTIONS ('force' = 'true')
- COPY INTO t FROM '/Volumes/raw/app/events' FILEFORMAT = JSON COPY_OPTIONS ('mergeSchema' = 'true') — Correct
- COPY INTO t FROM '/Volumes/raw/app/events' FILEFORMAT = JSON SCHEMA EVOLUTION = 'auto'
Correct answer
COPY INTO t FROM '/Volumes/raw/app/events' FILEFORMAT = JSON COPY_OPTIONS ('mergeSchema' = 'true')
Explanation
COPY_OPTIONS ('mergeSchema' = 'true') lets COPY INTO evolve the target schema. force = true reloads files regardless of history.
Question 2
Which ingestion method should be chosen when a supported database such as SQL Server needs ongoing CDC replication into Delta tables, with minimal custom code?
- UI file upload
- Lakeflow Connect managed connector for SQL Server — Correct
- A nightly JDBC full extract into CSV files in a volume
- A Delta Sharing recipient
Correct answer
Lakeflow Connect managed connector for SQL Server
Explanation
Lakeflow Connect database connectors capture changes from sources like SQL Server and keep Delta tables updated incrementally.
Question 3
An engineer must read a table from an on-premises PostgreSQL database into a notebook once per night and write it to a Delta table. Credentials must not appear in the notebook. Which approach is correct?
- Use Auto Loader with cloudFiles.format set to jdbc and the password in the options
- Use spark.read.format('jdbc') with the password typed into a notebook widget each night
- Use COPY INTO with a JDBC URL that includes the password as a query parameter
- Use the JDBC reader with the password read from a secret scope — Correct
Correct answer
Use the JDBC reader with the password read from a secret scope
Explanation
The JDBC reader can read database tables; secrets should be stored in a secret scope and retrieved with dbutils.secrets.get, which redacts them in output.
Question 4
A data engineer must load only files modified after a certain date from a folder that already contains years of historical files, using Auto Loader. Which option helps?
- cloudFiles.includeExistingFiles = true
- modifiedAfter — Correct
- cloudFiles.partitionColumns
- cloudFiles.backfillInterval
Correct answer
modifiedAfter
Explanation
The modifiedAfter option filters input files by modification time. includeExistingFiles = false would skip all files present when the stream first starts.
Question 5
A Kafka topic carries order events. The data engineer must ingest them into a bronze Delta table continuously. Which approach is appropriate?
- A Lakehouse Federation connection to the Kafka cluster
- COPY INTO with FILEFORMAT = KAFKA
- Auto Loader with cloudFiles.format = 'kafka'
- A Structured Streaming Kafka source written to Delta with a checkpoint — Correct
Correct answer
A Structured Streaming Kafka source written to Delta with a checkpoint
Explanation
Structured Streaming's Kafka source reads topics; writing to Delta with a checkpoint provides fault-tolerant ingestion. Auto Loader and COPY INTO read files.
Question 6
An Auto Loader stream was started with cloudFiles.includeExistingFiles set to false. What happens to files that were already in the folder when the stream first started?
- The stream fails until they are deleted
- They are processed first, before new files
- They are skipped; only later files are ingested — Correct
- They are moved into a quarantine folder
Correct answer
They are skipped; only later files are ingested
Explanation
includeExistingFiles = false ignores files present at the first start and processes only new arrivals.
Question 7
Which column can be selected in a file-based read to get the source file name and modification time of each row?
- input_file_path()
- _metadata — Correct
- _rescued_data
- _source
Correct answer
_metadata
Explanation
The hidden _metadata column provides file_path, file_name, file_size and file_modification_time for file-based sources. input_file_name() is the older function.
Question 8
A data engineer must ingest JSON files that arrive continuously in a cloud storage folder into a bronze Delta table. New fields appear occasionally and must be added to the table schema without manual changes. Which approach meets these requirements with the least effort?
- A Lakehouse Federation connection to the storage folder queried through a foreign catalog
- A scheduled spark.read.json job that overwrites the bronze table each hour with mergeSchema enabled
- COPY INTO with FORMAT_OPTIONS ('inferSchema' = 'false') and a fixed DDL schema on the target table
- Auto Loader with a schema location and schemaEvolutionMode set to addNewColumns — Correct
Correct answer
Auto Loader with a schema location and schemaEvolutionMode set to addNewColumns
Explanation
Auto Loader incrementally discovers new files, tracks progress in a checkpoint, and with a schema location can infer and evolve the schema. addNewColumns (the default when no schema is provided) adds new fields.
Question 9
A daily job must process all new files that arrived since the last run with Auto Loader and then stop, to save cost. Which trigger should be used?
- trigger(continuous='1 second')
- trigger(availableNow=True) — Correct
- trigger(processingTime='0 seconds')
- No trigger, with the default micro-batch interval
Correct answer
trigger(availableNow=True)
Explanation
availableNow processes all available data in one or more micro-batches and then stops, giving incremental batch semantics. The default trigger runs continuously.
Question 10
A data engineer must ingest a few Excel-like CSV extracts that a business user uploads occasionally. The extracts should be queryable by analysts the same day. What is the simplest option?
- Build a Kafka topic for the files
- Create a Lakehouse Federation connection to the user's laptop
- Write a custom Spark data source
- Upload the files and create a managed table — Correct
Correct answer
Upload the files and create a managed table
Explanation
For occasional small files, uploading to a volume or using the table upload UI is the simplest path.