VAYULearn
Colour theme
Investigate a failure
VAYU Learn

Databricks & Lakehouse

Practice Exam 1: Delta Lake, Unity Catalog, Compute, and Ingestion Patterns

DataForge Series: Databricks Data Engineer Associate - Part 14 of 16

Databricks & Lakehouse

50 scenario-based questions. Written the way the real exam is written — every wrong answer is architecturally plausible and fails at least one stated requirement. Every explanation tells you not just what the correct answer is but why each wrong answer fails.

Work through all 50 before checking answers. Time yourself — 90 minutes for 45 questions is the real exam pace. These 50 should take you about 100 minutes if you’re reading carefully.

Answer key and explanations start after Question 50.

50 scenario-based questions. Every wrong answer is architecturally plausible — the same way the real exam is written. Delta Lake, Unity Catalog, Compute, and Ingestion domains. 90-minute exam pace. Work through all 50 before checking answers.

Questions 1–50

Q1. A data engineer is building a pipeline that writes to a Delta table. A concurrent read job is running against the same table. The write job is midway through committing 20 Parquet files when the read job executes a query. What does the read job see?

A. A partial result containing the files committed so far
B. The table state before the write started — all 20 files are invisible until the commit completes
C. An error indicating a concurrent modification conflict
D. The table state after the write completes, regardless of when the read started


Q2. A data engineer runs VACUUM events RETAIN 24 HOURS on a Delta table. Three hours later, a stakeholder asks to restore the table to a version from two days ago. What is the outcome?

A. The restore succeeds because Delta always maintains version history regardless of VACUUM
B. The restore fails because VACUUM deleted the files needed for that version
C. The restore succeeds because VACUUM only removes uncommitted files
D. The restore fails because RESTORE TABLE requires a timestamp, not a version number


Q3. A data engineer creates a Delta table without specifying a LOCATION. Six months later, they run DROP TABLE prod.silver.events. What happens to the underlying Parquet files?

A. The files are moved to a trash directory and can be recovered within 30 days
B. The files remain at the storage location — only the metadata is removed
C. The files are physically deleted from storage
D. The files are retained until VACUUM is run with RETAIN 0 HOURS


Q4. A pipeline writes to a Delta table with schema enforcement enabled. An upstream source adds a new column user_segment STRING to its output. What happens when the pipeline runs?

A. The new column is automatically added to the Delta table schema
B. The write fails with a schema mismatch error
C. The new column is silently dropped and the write succeeds
D. The new column is stored in _rescued_data and the write succeeds


Q5. A data engineer needs to query a Delta table as it existed on January 15, 2024. The table has delta.logRetentionDurationset to 7 days and VACUUM was last run on January 20, 2024. Today is February 1, 2024. What is the correct approach?

A. SELECT * FROM events TIMESTAMP AS OF '2024-01-15' — this will succeed
B. SELECT * FROM events VERSION AS OF 1 — version numbers are always retained
C. The query will fail — the files from January 15 were deleted by VACUUM
D. Restore from an external backup — Delta time travel only goes back 24 hours by default


Q6. A Delta table checkpoint is written. What does the checkpoint contain and what problem does it solve?

A. A backup copy of all Parquet data files; it enables fast data recovery after failures
B. A Parquet snapshot of all active file references at that version; it prevents the log reader from replaying every commit since table creation
C. A compressed archive of the _delta_log/ JSON files; it reduces storage costs
D. A manifest of deleted files eligible for VACUUM; it enables faster cleanup operations


Q7. A data engineer runs two concurrent MERGE operations targeting the same Delta table partitions. One MERGE succeeds. What happens to the second MERGE?

A. It fails immediately with a table lock error
B. It queues and waits for the first MERGE to release the lock
C. It detects the conflict via OCC at commit time and retries automatically
D. Both MERGEs succeed — Delta supports fully concurrent writes with no conflicts


Q8. A data engineer wants to allow a Delta table’s schema to accept new columns from upstream sources without failing the pipeline, while still rejecting type changes. Which configuration achieves this?

A. spark.conf.set("spark.databricks.delta.schema.autoMerge.enabled", "true")
B. .option("mergeSchema", "true") on the write operation
C. Dropping and recreating the table on each run
D. Using COPY INTO instead of a streaming write


Q9. Which statement accurately describes how Delta Lake builds ACID guarantees on top of cloud object storage?

A. Delta uses distributed locks on S3/ADLS to prevent concurrent access
B. Delta uses a transaction log of append-only commit files plus OCC to provide ACID without infrastructure-level locking
C. Delta replicates each write to a standby region before committing
D. Delta uses Spark’s executor coordination to serialize all writes


Q10. A data engineer creates a table with CREATE TABLE prod.raw.events USING DELTA LOCATION 's3://bucket/raw/events'. A pipeline accidentally runs DROP TABLE prod.raw.events. What is the recovery path?

A. The data is gone — DROP TABLE on any Delta table deletes underlying files
B. The data files remain at s3://bucket/raw/events — re-register the table with CREATE TABLE ... LOCATION
C. Run RESTORE TABLE prod.raw.events TO LAST VERSION to recover
D. Contact Databricks support — only managed table recovery is self-service


Q11. A Unity Catalog metastore is configured for the us-east-1 region. A data engineering team needs to access the same tables from both a data-engineering-workspace and an ml-workspace. What is the correct architecture?

A. Create separate metastores for each workspace — metastores cannot be shared
B. Both workspaces attach to the same metastore — all catalogs, schemas, and tables are shared across workspaces in the same region
C. Use Delta Sharing to replicate tables between workspace-specific metastores
D. Create separate catalogs in each workspace and sync them via a scheduled pipeline


Q12. An analyst in the analysts group runs SELECT * FROM prod.gold.customers and receives the error "Schema 'prod.gold' cannot be found." The data engineer confirms that GRANT SELECT ON TABLE prod.gold.customers TO analysts was applied correctly. What is the most likely cause?

A. The analysts group needs GRANT SELECT ON SCHEMA prod.gold instead of table-level SELECT
B. The table prod.gold.customers does not exist
C. The analysts group is missing GRANT USE CATALOG ON CATALOG prod and/or GRANT USE SCHEMA ON SCHEMA prod.gold
D. The analyst needs to run USE CATALOG prod manually before querying


Q13. A data engineer needs to grant an ML team read access to all current and future tables in the prod.features schema without granting access to any other schemas in the prod catalog. What is the minimum set of grants required?

A. GRANT SELECT ON CATALOG prod TO ml-team
B. GRANT USE CATALOG ON CATALOG prod TO ml-team; GRANT USE SCHEMA ON SCHEMA prod.features TO ml-team; GRANT SELECT ON ALL TABLES IN SCHEMA prod.features TO ml-team
C. GRANT USE SCHEMA ON SCHEMA prod.features TO ml-team; GRANT SELECT ON ALL TABLES IN SCHEMA prod.features TO ml-team
D. GRANT SELECT ON SCHEMA prod.features TO ml-team


Q14. A compliance requirement states that contractors must never access the prod.gold.pii_events table, even if they are members of groups that have been granted SELECT on the prod.gold schema. How should this be enforced in Unity Catalog?

A. Remove all contractor users from the groups that have schema-level SELECT
B. Apply DENY SELECT ON TABLE prod.gold.pii_events TO contractors
C. Create a separate catalog without the pii_events table for contractor access
D. Use column masking to redact all columns in the table for contractor users


Q15. A data engineer runs DROP TABLE prod.silver.events_cleaned. This was a managed Unity Catalog table. The data engineer expected only the metadata to be removed. What actually happened and how should future tables be created to match the expected behavior?

A. The behavior is correct for managed tables — use CREATE TABLE ... LOCATION 's3://...' for external tables that preserve data on DROP
B. The behavior is a bug — managed tables should preserve data files when dropped
C. The data files are in a recycle bin and can be recovered within 24 hours
D. The behavior only applies to tables in the default catalog — tables in named catalogs always preserve data on DROP


Q16. Unity Catalog automatically captures lineage for a transformation that reads prod.bronze.events and writes to prod.silver.events_cleaned. A separate Python script writes directly to the prod.silver.events_cleaned Delta table path via the S3 API. How does lineage appear for the S3 direct write?

A. Unity Catalog captures all writes to registered table paths automatically
B. The S3 direct write creates a lineage gap — only Databricks-executed operations appear in the lineage graph
C. The lineage shows the write with “external source” as the upstream node
D. The S3 write appears in the audit log and is automatically added to lineage


Q17. A data platform team manages five workspaces across dev, staging, and production environments. They want analysts to be able to query any production Gold table from any workspace using the same table reference. Which Unity Catalog feature enables this?

A. Delta Sharing — replicates tables across workspace-specific metastores
B. A single metastore shared across all workspaces — tables registered once are accessible by the same name from all attached workspaces
C. Cross-workspace table mirroring configured in the workspace settings
D. External tables with shared S3 locations accessible from all workspaces


Q18. An analytics team runs ad hoc SQL queries throughout the day against curated Delta tables. They need efficient query performance, support for 15 simultaneous users, fast startup, and cost management through automatic scale-down when idle. Which compute configuration is correct?

A. An all-purpose cluster with autoscaling enabled and a fixed maximum of 10 workers
B. A job cluster sized for the average query workload
C. A SQL Warehouse (Pro or Serverless) with autoscaling
D. A single-node cluster with Photon enabled


Q19. A data engineer is running a scheduled ETL pipeline that processes 200GB of data nightly. The pipeline has been running on an all-purpose cluster shared with the development team. The platform team wants to reduce cost and improve isolation. What is the correct compute change?

A. Move the pipeline to a dedicated all-purpose cluster with autotermination disabled
B. Move the pipeline to a job cluster defined in the Lakeflow Job configuration
C. Move the pipeline to a SQL Warehouse for cost efficiency
D. Increase the all-purpose cluster size and dedicate it to the ETL pipeline


Q20. A Spark job’s performance degrades every Tuesday when data volume spikes. The job uses num_workers: 4 (fixed). An engineer proposes enabling autoscaling between 2 and 16 workers. The job has heavy shuffle operations. What is the risk of enabling autoscaling on this job?

A. Autoscaling cannot be enabled on job clusters — only all-purpose clusters
B. Autoscaling may add workers mid-shuffle, causing the shuffle to restart and increasing job duration
C. Autoscaling with a minimum of 2 workers will increase cost compared to fixed 4 workers
D. Autoscaling will reduce parallelism by removing workers during heavy stages


Q21. A Databricks platform administrator wants to prevent engineers from creating clusters with more than 10 workers or without autotermination. What is the correct mechanism?

A. Write a monitoring script that terminates non-compliant clusters after creation
B. Create a cluster policy that enforces maximum worker count and required autotermination
C. Restrict cluster creation permissions to admin users only
D. Use workspace-level settings to cap total cluster DBUs


Q22. A Photon-enabled Pro SQL Warehouse is configured for a team that runs Python UDF-heavy workloads. A data engineer claims Photon will significantly speed up these workloads. Is this claim correct?

A. Yes — Photon accelerates all Databricks compute workloads
B. No — Photon accelerates SQL queries on Delta tables but does not benefit Python UDF workloads
C. Yes — Photon specifically optimizes UDF execution through native code generation
D. No — Photon is only available on Serverless SQL Warehouses


Q23. A Serverless SQL Warehouse and a Classic SQL Warehouse are both available. A BI team needs interactive dashboards that return results within 5 seconds of first load after a period of inactivity. Which warehouse type is most appropriate and why?

A. Classic — more cost-effective for sustained workloads
B. Serverless — 5–10 second cold start vs 2–3 minutes for Classic, making it suitable for interactive use after idle periods
C. Classic with auto-resume enabled — resumes instantly from idle state
D. Either — both provide equivalent cold start performance


Q24. A data engineer configures a job cluster for a Lakeflow Job with min_workers: 2 and max_workers: 8. The job runs for 10 minutes. What is the minimum compute cost incurred?

A. Cost for 0 workers — job clusters don’t charge until tasks start executing
B. Cost for 2 workers for the full job duration including startup and termination
C. Cost for 8 workers — autoscaling always charges the maximum configured
D. Cost for 1 worker — the driver node only, until tasks begin


Q25. Which statement correctly describes the DBU cost difference between all-purpose clusters and job clusters?

A. All-purpose clusters have a lower DBU rate than job clusters because they use less infrastructure
B. Job clusters have a lower DBU rate than all-purpose clusters because they don’t support persistent state and interactive use
C. Both cluster types charge identical DBU rates — cost difference is only in runtime
D. Job clusters have a higher DBU rate because they include cluster startup overhead


Q26. A data engineer needs to ingest JSON files that arrive in an S3 bucket every 5 minutes. The files occasionally contain new fields that should be automatically added to the target Delta table. Which ingestion mechanism and configuration is correct?

A. COPY INTO with COPY_OPTIONS ('mergeSchema' = 'true') on a 5-minute schedule
B. Auto Loader with cloudFiles.schemaEvolutionMode = addNewColumns and trigger(processingTime="5 minutes")
C. Lakeflow Connect with a standard S3 connector and 5-minute sync interval
D. A Python script using boto3 to download files and spark.read.json() to load them


Q27. A data engineer runs COPY INTO prod.raw.events FROM 's3://bucket/raw/events/' FILEFORMAT = JSON on a schedule every hour. Files accumulate in the S3 bucket over time. After 6 months, the same command is run twice in the same hour due to a scheduling error. What is the behavior?

A. The second run produces duplicate records in the target table
B. The second run loads no new files — COPY INTO’s load history prevents re-processing already-loaded files
C. The second run fails with a concurrent modification error
D. The second run overwrites the data loaded by the first run


Q28. A data engineer is designing an incremental ingestion pipeline for a Salesforce CRM system. The requirement is to capture inserts, updates, AND hard deletes. Which Lakeflow Connect configuration achieves this?

A. Incremental sync mode — captures all changes including deletes by default
B. CDC mode — captures inserts, updates, and deletes via the source change log
C. Full refresh mode — reloads all data on each run, effectively capturing deletes
D. Incremental sync with include_deletes = true option


Q29. An Auto Loader pipeline has been running for 3 months. The checkpoint directory is accidentally deleted. The pipeline is restarted. What is the behavior?

A. Auto Loader detects the missing checkpoint and reconstructs it from the Delta transaction log
B. Auto Loader starts from the beginning — all files in the source location are treated as new
C. Auto Loader fails to start and requires manual checkpoint recovery
D. Auto Loader starts from the current timestamp — all historical files are skipped


Q30. A pipeline uses Auto Loader with trigger(availableNow=True) scheduled via a Lakeflow Job to run hourly. How does this differ from using trigger(processingTime="1 hour")?

A. They are equivalent — both process files on a 1-hour cadence
B. availableNow=True processes all pending files then terminates the stream; processingTime runs continuously and processes files as they arrive within each interval
C. availableNow=True is deprecated and should not be used in new pipelines
D. processingTime="1 hour" processes all pending files at the interval; availableNow=True only processes the most recent file


Q31. A Lakeflow Connect pipeline syncing Workday HR data has been running successfully for 2 weeks. Workday releases a breaking API version change and the connector stops working. The data engineering team investigates the fix timeline. What determines how quickly the fix is available?

A. Databricks engineering — all connectors are maintained by Databricks
B. The data engineering team — they must update the connector configuration
C. The connector type — standard connectors are fixed by Databricks; managed connectors are fixed by the partner vendor
D. The Databricks support SLA — all connector issues are resolved within 24 hours


Q32. A data engineer needs to ingest data from a PostgreSQL database table with 50 million rows into a Delta table. The pipeline uses JDBC. The job runs on the driver node only, taking 4 hours to complete. What configuration change would most improve performance?

A. Increase the driver memory to handle the full 50M row result set
B. Add partitionColumn, numPartitions, lowerBound, and upperBound to enable parallel reads across executors
C. Use COPY INTO instead of JDBC for large table ingestion
D. Increase the number of JDBC connection pool connections


Q33. A data engineer designs a Bronze layer table for event ingestion. Which of the following behaviors violates the Bronze layer contract?

A. Preserving the _rescued_data column from Auto Loader
B. Adding _ingested_at and _source_file metadata columns
C. Filtering out records where user_id IS NULL before writing
D. Using outputMode("append") to prevent overwriting existing data


Q34. Auto Loader is configured with cloudFiles.schemaEvolutionMode = addNewColumns. An upstream source changes a column from INTEGER to STRING. What happens when the pipeline processes the next file?

A. The column type change is automatically applied to the Delta table schema
B. The stream fails — type changes are not handled by addNewColumns mode
C. The column values are stored in _rescued_data because they don't match the stored schema
D. The records with the type-changed column are silently dropped


Q35. A Lakeflow Connect pipeline syncing Salesforce data uses incremental sync mode. An analyst reports that 500 accounts that were deleted from Salesforce 3 weeks ago are still appearing in the target Delta table. What is the root cause?

A. Lakeflow Connect has a 30-day delete propagation delay by default
B. Incremental sync tracks inserts and updates via modification timestamps — hard deletes are not captured without CDC mode
C. The sync cursor has become stale and needs to be reset
D. The Delta table’s VACUUM settings are preventing record deletion


Q36. Which statement correctly describes the difference between Auto Loader’s directory listing mode and file notification mode?

A. Directory listing mode uses cloud event notifications; file notification mode scans the directory on each trigger
B. Directory listing mode scans the source directory on each trigger; file notification mode uses cloud event notifications (SQS, Event Grid) for lower latency and better scale
C. Both modes scan the directory — the difference is in how frequently the scan occurs
D. File notification mode is only available for ADLS; directory listing mode works with all cloud storage providers


Q37. A data engineering team receives files from three different source systems, all landing in the same S3 prefix. Files from System A are JSON, System B are Parquet, and System C are CSV. They want to use a single Auto Loader pipeline. What constraint applies?

A. Auto Loader supports multiple file formats in a single pipeline through automatic format detection
B. Auto Loader requires a single consistent file format per pipeline — separate pipelines are needed for each format
C. Auto Loader can handle multiple formats if cloudFiles.format = auto is set
D. Auto Loader only supports JSON and Parquet — CSV files require COPY INTO


Q38. A data engineer needs to track which source file each Bronze record originated from for audit purposes. Which Auto Loader configuration enables this?

A. .option("cloudFiles.includeExistingFiles", "true")
B. .withColumn("_source_file", input_file_name())
C. .option("cloudFiles.schemaLocation", "s3://bucket/schema") with file tracking enabled
D. This cannot be achieved with Auto Loader — use COPY INTO for file-level provenance


Q39. A pipeline uses COPY INTO to load files daily from S3 into a Delta table. After 18 months, the data team notices the daily COPY INTO runs are taking progressively longer. The source files and target table haven’t changed significantly. What is the most likely cause?

A. The Delta table has too many small files and needs OPTIMIZE
B. The COPY INTO load history has accumulated 18 months of file entries, and scanning the history grows over time
C. Auto Loader would perform better for this use case
D. The S3 bucket’s cross-region latency has increased


Q40. A data engineer writes the following pipeline:

df = spark.readStream.format("cloudFiles") \
.option("cloudFiles.format", "json") \
.option("cloudFiles.schemaLocation", "s3://bucket/schema") \
.load("s3://bucket/raw/")

df.writeStream.format("delta") \
.option("checkpointLocation", "s3://bucket/checkpoint") \
.trigger(once=True) \
.start("s3://bucket/delta/events")

What issue exists with this code?

A. trigger(once=True) is not supported for Delta targets
B. trigger(once=True) is deprecated — use trigger(availableNow=True) instead
C. The schemaLocation and checkpointLocation cannot be in the same bucket
D. Auto Loader requires outputMode("append") to be explicitly set


Q41. A data engineer is building a pipeline to ingest data from both Salesforce (CRM) and an S3-based event log. Which combination of ingestion mechanisms is correct?

A. Auto Loader for Salesforce; COPY INTO for S3 events
B. Lakeflow Connect for Salesforce; Auto Loader for S3 events
C. Lakeflow Connect for both — it supports S3 as a source
D. JDBC for Salesforce; Auto Loader for S3 events


Q42. A compliance team requires that all data ingested into the Bronze layer from any source be replayable — meaning any downstream Silver or Gold table can be fully reconstructed by re-running transformations from Bronze. Which Bronze design decision is most critical to enable this?

A. Partitioning Bronze tables by ingestion date for efficient replay queries
B. Using append-only writes — never overwriting Bronze data
C. Storing Bronze in Parquet format for cross-engine compatibility
D. Compressing Bronze files with Snappy for storage efficiency


Q43. A data engineer creates an Auto Loader pipeline for the first time against a directory containing 1 million existing files plus new files arriving daily. What does Auto Loader do with the 1 million existing files on the first run?

A. Skips the existing files — Auto Loader only processes files that arrive after the pipeline starts
B. Processes all 1 million existing files on the first run, then processes only new files on subsequent runs
C. Fails — Auto Loader cannot handle directories with existing files
D. Processes a sample of existing files to infer schema, then begins processing new files


Q44. A Lakeflow Connect pipeline is configured with incremental sync and runs every 30 minutes. The source system’s clock drifted backward by 2 hours due to a misconfiguration. 50,000 records were updated with updated_at timestamps from 2 hours ago. What happens to these records?

A. The sync cursor detects the backdated timestamps and re-processes the affected time window
B. The records fall behind the cursor’s current watermark and are never synced to the target
C. Lakeflow Connect raises an alert for clock drift and pauses until the issue is resolved
D. The records are synced correctly — Lakeflow Connect uses record IDs, not timestamps


Q45. A data engineer is choosing between Auto Loader and COPY INTO for a pipeline that loads files arriving once per day with a maximum of 10,000 files per run. The pipeline needs to be idempotent — running the command twice should not produce duplicates. Which mechanism and reasoning is correct?

A. Auto Loader — it provides streaming semantics and is always preferred over COPY INTO
B. COPY INTO — it maintains a load history that makes it idempotent by design, and 10,000 files per day is well within its scaling range
C. Auto Loader — COPY INTO cannot guarantee idempotency
D. COPY INTO — Auto Loader does not support idempotent operation


Q46. An engineer notices that a Lakeflow Connect sync for ServiceNow tickets is showing status RUNNING for 3 hours — far longer than the usual 15-minute runtime. There are no error messages. What is the most likely explanation?

A. The sync is processing an unusually large batch of new tickets
B. The ServiceNow API has enforced a rate limit and the connector is in backoff state
C. The connector has lost its sync cursor and is performing a full re-sync
D. The Unity Catalog target table has a write lock from another process


Q47. A data engineer creates an external Delta table pointing to s3://bucket/prod/gold/customers/. An analyst with no Unity Catalog privileges uses the AWS CLI to run aws s3 cp s3://bucket/prod/gold/customers/ ./local/ --recursive and copies all Parquet files. What security control prevents this in a properly secured environment?

A. Unity Catalog row-level security prevents reading files outside of authorized queries
B. Delta table encryption prevents reading Parquet files without Databricks credentials
C. AWS IAM policies restricting S3 access to authorized service principals only — UC security does not apply to direct object storage access
D. The Parquet files are encrypted by Unity Catalog and cannot be read without the UC decryption key


Q48. A data engineer is designing ingestion for a source that produces 5 million events per hour and delivers them as JSON files to an ADLS container. Which mechanism is most appropriate?

A. Lakeflow Connect with a standard connector for ADLS
B. COPY INTO on a 1-hour schedule
C. Auto Loader with file notification mode and trigger(processingTime="5 minutes")
D. Direct JDBC read from the source database


Q49. A pipeline ingests semi-structured JSON with deeply nested arrays. The nested structure needs to be flattened before writing to a Silver Delta table. Which Auto Loader configuration enables schema inference for nested JSON?

A. .option("cloudFiles.format", "json") with .option("cloudFiles.inferColumnTypes", "true")
B. Auto Loader cannot infer schema for nested JSON — a manual schema must always be provided
C. .option("cloudFiles.format", "json") — Auto Loader automatically flattens nested structures
D. Auto Loader infers the schema as a single STRING column for nested JSON


Q50. A data engineering team needs a single ingestion solution that handles: Salesforce opportunities, ServiceNow incidents, and a PostgreSQL operational database — all loading into Unity Catalog managed Delta tables with incremental sync. What is the correct architecture?

A. Auto Loader for all three — it’s the most scalable ingestion mechanism
B. COPY INTO for all three — it’s the most idempotent ingestion mechanism
C. Lakeflow Connect for Salesforce and ServiceNow; direct JDBC read (via Lakeflow Job) or Lakeflow Connect DB connector for PostgreSQL
D. Lakeflow Connect for Salesforce and ServiceNow; Auto Loader for PostgreSQL


Answer Key and Explanations

Q1. Answer: B

Delta Lake’s isolation guarantee ensures readers see a consistent snapshot — either the state before the write or after the write, never a partial state. The write isn’t committed to _delta_log/ until all 20 files are written and the commit JSON is atomically recorded. A read that starts before the commit sees the pre-write snapshot. A — partial results would violate atomicity. C — reads don't fail on concurrent writes; only concurrent writes conflict with each other. D — a read that starts before commit cannot see post-commit state.


Q2. Answer: B

VACUUM RETAIN 24 HOURS deletes all files outside the 24-hour retention window. A version from two days ago requires files that are now gone. A — Delta does NOT maintain version history independent of physical files; time travel requires the actual Parquet files to still exist. C — VACUUM removes all files outside the retention window, including committed data files. D — RESTORE TABLE supports both version and timestamp syntax.


Q3. Answer: C

A table created without a LOCATION is a managed table — Unity Catalog owns both the metadata and the data files. DROP TABLE on a managed table deletes both. A — there is no built-in trash/recycle mechanism. B — that behavior describes external tables. D — VACUUM operates on old file versions, not on current table files.


Q4. Answer: B

Schema enforcement is on by default. A write containing a column not in the table’s registered schema fails with a schema mismatch error. A — automatic schema addition requires mergeSchema=true or autoMerge=true. C — Spark does not silently drop unknown columns. D — _rescued_data is an Auto Loader feature, not a Delta write behavior.


Q5. Answer: C

VACUUM with 7-day retention deletes files older than 7 days. January 15 is 17 days before February 1. The January 20 VACUUM run deleted the January 15 files. A — the query syntax is correct but will fail because the physical files no longer exist. B — version numbers are log entries, but log entries reference physical files that have been deleted. D — the default retention is 7 days, not 24 hours; and time travel fails because of VACUUM, not a default limit.


Q6. Answer: B

Checkpoints are Parquet snapshots of all active file references at a specific version. They solve the problem of log replay — without checkpoints, reading a table with 100,000 commits would require replaying all 100,000 JSON files. A — checkpoints contain file references, not data file contents. C — checkpoints don’t compress JSON logs. D — checkpoints are not VACUUM manifests.


Q7. Answer: C

Delta uses Optimistic Concurrency Control (OCC). The second MERGE reads the current log state, performs its operation, then attempts to commit. If the first MERGE has already committed conflicting changes, the second detects the conflict and retries automatically. A — Delta doesn’t use traditional table-level locks. B — queuing/waiting is a locking behavior, not OCC behavior. D — fully concurrent conflicting writes to the same partition would produce incorrect results without conflict detection.


Q8. Answer: B

.option("mergeSchema", "true") on the write operation adds new columns from the incoming DataFrame to the Delta table schema while failing on type conflicts. A — global autoMerge silently adds columns from any write, which is risky in production. C — dropping and recreating destroys history. D — COPY INTO handles file-based idempotent loads, not schema evolution during streaming writes.


Q9. Answer: B

Delta builds ACID on object storage through an append-only transaction log (providing durability and atomicity) and OCC (providing isolation without distributed locks). A — object storage doesn’t support distributed locks; Delta’s design explicitly avoids them. C — Delta doesn’t require cross-region replication for ACID. D — Spark executors don’t coordinate writes; the transaction log handles this.


Q10. Answer: B

The table was created with an explicit LOCATION, making it an external table. DROP TABLE on an external table removes only the Unity Catalog metadata registration — the data files at s3://bucket/raw/events are untouched. Re-register with CREATE TABLE ... LOCATION 's3://bucket/raw/events'. A — DROP TABLE behavior depends on managed vs external. C — RESTORE TABLE won't work because the metadata registration is gone. D — external table recovery is self-service.


Q11. Answer: B

One metastore per region serves all attached workspaces. Tables registered in the metastore are accessible by the same name from any attached workspace. A — sharing across workspaces is the core Unity Catalog design. C — Delta Sharing is for cross-organization sharing, not multi-workspace within the same account. D — syncing via pipeline creates data copies, not shared access to the same tables.


Q12. Answer: C

SELECT on a table requires three grants: USE CATALOG, USE SCHEMA, and SELECT. The SELECT was granted correctly but the traversal grants were omitted. The error “schema not found” is the misleading message Unity Catalog returns when USE CATALOG or USE SCHEMA is missing. A — schema-level SELECT doesn’t exist as a privilege type. B — the data engineer confirmed the table exists. D — running USE CATALOG manually doesn't substitute for the privilege grant.


Q13. Answer: B

All three grants are required: USE CATALOG to traverse into the catalog, USE SCHEMA to traverse into the schema, and SELECT on the tables. A — catalog-level SELECT would expose all schemas in the catalog, violating the requirement. C — USE CATALOG is missing; the schema traversal would fail. D — GRANT SELECT ON SCHEMA is not valid Unity Catalog syntax.


Q14. Answer: B

DENY SELECT ON TABLE places an explicit deny that overrides any group-level or schema-level SELECT grants. Regardless of what groups the contractor users belong to, the DENY takes precedence. A — removing from groups is fragile and doesn't prevent future group additions. C — separate catalogs add operational complexity and duplication. D — column masking restricts what data is returned, not whether the table can be accessed.


Q15. Answer: A

Managed table DROP TABLE behavior is correct and by design — Unity Catalog owns the lifecycle of managed tables including data files. The solution for future tables where data must survive DROP is to use external tables with explicit LOCATION. B — this is not a bug; it's the documented managed table behavior. C — there is no recycle bin. D — the behavior is consistent across all catalogs.


Q16. Answer: B

Unity Catalog lineage captures operations executed through Databricks. Direct S3 API writes bypass Unity Catalog entirely — no query plan is processed, no lineage is captured. The graph shows the table as having no upstream for that write path. A — UC does not monitor storage-level writes. C — there is no “external source” node for untracked writes. D — audit logs record authenticated UC queries, not raw S3 operations.


Q17. Answer: B

A single metastore attached to all workspaces means tables registered once are accessible by the same catalog.schema.tablereference from any attached workspace. A — Delta Sharing is for cross-organization access. C — cross-workspace table mirroring is not a UC feature. D — external tables sharing S3 locations would work technically but require separate metadata registrations per workspace.


Q18. Answer: C

SQL Warehouses are designed for SQL analytics with concurrent user support, horizontal scaling for concurrency, and automatic scale-down when idle. Pro or Serverless provides Photon acceleration and handles 15 simultaneous users gracefully. A — all-purpose clusters handle concurrency poorly; multiple simultaneous users compete for executor slots. B — job clusters are for automated pipelines, not interactive queries. D — single-node clusters don’t support concurrent users.


Q19. Answer: B

Scheduled ETL pipelines belong on job clusters — ephemeral, dedicated per-run, clean environment, automatically terminated on completion, lower DBU rate than all-purpose. A — dedicated all-purpose cluster without autotermination accumulates idle DBUs overnight. C — SQL Warehouses cannot run arbitrary PySpark ETL. D — increasing all-purpose cluster size adds cost without addressing the isolation or idle cost problems.


Q20. Answer: B

Autoscaling adds worker nodes when task demand increases. If worker nodes are added during a shuffle operation, Spark must restart the shuffle on the new topology — the in-progress shuffle data is invalidated. This can make heavily shuffle-dependent jobs slower with autoscaling than with fixed workers. A — autoscaling is supported on job clusters. C — minimum 2 workers vs fixed 4 workers actually reduces cost when the job doesn’t need all 4 workers. D — autoscaling removes idle workers, not active workers during heavy stages.


Q21. Answer: B

Cluster policies are JSON configuration templates that administrators use to enforce guardrails on cluster creation. They can mandate maximum worker count, require autotermination, restrict instance types, and set other defaults. A — reactive monitoring can’t prevent cluster creation. C — restricting creation to admins removes self-service capability. D — workspace-level DBU caps are coarser than per-cluster configuration enforcement.


Q22. Answer: B

Photon is a vectorized C++ execution engine optimized for SQL queries on Delta tables. It accelerates SQL operations (scans, joins, aggregations on columnar Delta data). Python UDFs execute in the JVM or Python process — Photon cannot accelerate them. A — Photon has specific workload targets. C — Photon does not optimize UDF execution. D — Photon is available on Pro and Serverless SQL Warehouses and on clusters with DBR 9.1+.


Q23. Answer: B

Serverless SQL Warehouse cold start is 5–10 seconds. Classic SQL Warehouse cold start is 2–3 minutes. For interactive dashboards accessed after idle periods, a 5-second cold start is the difference between usable and frustrating. A — Classic is more cost-effective for sustained high-utilization workloads, not for interactive use with idle periods. C — Classic auto-resume still takes 2–3 minutes. D — cold start performance differs significantly between the two types.


Q24. Answer: B

Autoscaling with min_workers: 2 means the cluster never drops below 2 workers. For the full duration — startup, job execution, and termination — the cluster runs at minimum 2 workers. Cost is charged for 2 workers for the complete job duration. A — DBUs are charged from cluster start, not from first task. C — autoscaling charges actual workers used, not the maximum. D — driver cost is separate; worker minimum is 2.


Q25. Answer: B

Job clusters have a lower DBU rate than all-purpose clusters because all-purpose clusters require platform infrastructure for interactive collaboration, persistent state, and multi-user support. Job clusters are single-purpose and ephemeral. A — the relationship is reversed. C — DBU rates differ by cluster type. D — job cluster startup is a time cost, not a higher DBU rate.


Q26. Answer: B

Auto Loader with addNewColumns handles new fields automatically by updating the stored schema and restarting the stream. trigger(processingTime="5 minutes") processes files every 5 minutes continuously. A — COPY INTO is batch; 5-minute scheduling creates latency and load history scaling issues at high file counts. C — Lakeflow Connect connects to enterprise SaaS APIs, not S3 file ingestion. D — boto3 + spark.read doesn't provide checkpoint-based exactly-once semantics.


Q27. Answer: B

COPY INTO maintains a load history table in the Delta table’s metadata. Files already successfully loaded are recorded. The second run finds all files already in the load history and skips them — zero new records loaded, no duplicates. A — the load history prevents this. C — COPY INTO is a single operation, not a concurrent write. D — COPY INTO doesn’t overwrite; it appends only unprocessed files.


Q28. Answer: B

CDC mode captures the full change stream by reading the source system’s change log (Salesforce Change Data Capture API, PostgreSQL logical replication, etc.). Incremental sync uses modification timestamps and misses hard deletes. A — incremental sync explicitly does NOT capture hard deletes. C — full refresh detects deletes only by absence, not as events; creates unnecessary full reload cost. D — include_deletes is not a valid Lakeflow Connect parameter.


Q29. Answer: B

Without a checkpoint, Auto Loader has no record of which files were previously processed. It treats the source directory as new and processes all files from the beginning. This may produce duplicates if the target Delta table already contains data from the previous runs. A — Auto Loader checkpoints are external state; they cannot be reconstructed from the Delta log. C — Auto Loader starts successfully but re-processes everything. D — Auto Loader doesn’t have a “start from now” behavior — it scans the full directory.


Q30. Answer: B

trigger(availableNow=True) processes all files pending in the source directory since the last checkpoint, then the stream terminates. The Lakeflow Job starts the stream, processes the backlog, and completes — behaving like a batch job with checkpoint semantics. trigger(processingTime="1 hour") keeps the stream running continuously, processing micro-batches every hour indefinitely. A — they have different execution models. C — trigger(once=True) is deprecated; availableNow is the replacement. D — both process all pending files; the difference is whether the stream terminates.


Q31. Answer: C

Standard connectors (Salesforce, ServiceNow, Workday, etc.) are built and maintained by Databricks — Databricks engineers update them for API changes under Databricks’ SLA. Managed connectors are built by partner vendors and maintained by those vendors — the fix timeline depends on the partner’s engineering capacity and SLA commitments. A — managed connectors are not Databricks’ responsibility. B — the data team configures connectors but doesn’t build or maintain them. D — there is no universal 24-hour SLA for connector issues.


Q32. Answer: B

Without partitionColumn, JDBC reads execute as a single-threaded query through the driver node. Adding partitionColumn, numPartitions, lowerBound, and upperBound splits the query into N parallel sub-queries, each read by a separate executor. This is the primary performance lever for large JDBC table ingestion. A — increasing driver memory doesn't enable parallel reads. C — COPY INTO requires files in object storage, not a JDBC connection. D — connection pool size doesn't affect Spark's read parallelism.


Q33. Answer: C

Filtering records at Bronze violates the completeness contract. Bronze must land everything that arrived — filtering creates permanent data loss that cannot be replayed. If a business rule later changes, the filtered records are gone. A, B, D — all are correct Bronze behaviors: preserving rescued data, adding ingestion metadata, and using append mode.


Q34. Answer: B

addNewColumns handles the addition of new columns to the schema. It does not handle type changes. A column shifting from INTEGER to STRING is a type conflict — the stream fails with a schema mismatch error and requires manual intervention (explicit schema migration on the Delta table). A — type changes are explicitly not handled. C — _rescued_data captures fields that don't match the schema in file reading, not Spark type conflicts during write. D — records are not silently dropped; the stream fails.


Q35. Answer: B

Lakeflow Connect incremental sync tracks record changes via modification timestamps (SystemModstamp in Salesforce). Hard deletes — records physically removed from the source — don't update a modification timestamp; they simply disappear. The incremental sync cursor never sees the deletion event. CDC mode must be enabled to capture hard deletes. A — there is no default 30-day delete propagation delay. C — cursor staleness would cause missed updates, not missing deletes. D — VACUUM operates on Delta file versions, not on logical record deletions.


Q36. Answer: B

Directory listing mode scans the source directory on each trigger to find new files — simple, no infrastructure requirements, scales to millions of files before listing overhead becomes significant. File notification mode uses cloud event services (S3 SQS, ADLS Event Grid) to receive real-time file arrival notifications, enabling lower latency and eliminating listing overhead at extreme scale. A — the description is reversed. C — both modes detect new files; the mechanism differs. D — both modes work with S3, ADLS, and GCS.


Q37. Answer: B

Auto Loader requires a single consistent file format per pipeline, specified via cloudFiles.format. Each source format needs its own Auto Loader pipeline with the appropriate format option. A — Auto Loader does not auto-detect formats. C — cloudFiles.format = auto is not a valid option. D — Auto Loader supports JSON, Parquet, CSV, Avro, ORC, and other formats — the limitation is per-pipeline consistency, not format support.


Q38. Answer: B

input_file_name() is a Spark SQL function that returns the source file path for each row being processed. Adding it as a column in the Auto Loader DataFrame transformation captures the source file path at the record level. A — includeExistingFiles controls whether existing files are processed on first run. C — schemaLocation stores schema inference state, not file provenance. D — this is achievable with Auto Loader.


Q39. Answer: B

COPY INTO stores a load history entry for every successfully loaded file inside the Delta table’s metadata. After 18 months of daily runs with many files per run, the load history contains thousands of entries. Each COPY INTO run scans this entire history to determine which new files haven’t been loaded. As the history grows, this scan takes progressively longer. A — small files affect read performance, not COPY INTO operation time. C — Auto Loader would solve the problem but isn’t the cause. D — S3 latency is not load history dependent.


Q40. Answer: B

trigger(once=True) is deprecated in Spark Structured Streaming. The replacement is trigger(availableNow=True), which provides the same behavior (process all available data then terminate) with improved semantics and correctness guarantees. A — trigger(once=True) does work for Delta targets but is deprecated. C — schemaLocation and checkpointLocation can be in the same bucket at different prefixes. D — outputMode("append") defaults correctly for this use case.


Q41. Answer: B

Lakeflow Connect handles enterprise SaaS API sources (Salesforce, ServiceNow) — it manages authentication, pagination, rate limiting, and incremental sync against their REST APIs. Auto Loader handles file-based ingestion from object storage (S3 JSON files). The two mechanisms are matched to their correct source types. A — Auto Loader cannot connect to the Salesforce API. C — Lakeflow Connect does not ingest files from S3. D — JDBC doesn’t connect to Salesforce’s REST API.


Q42. Answer: B

Append-only writes preserve complete Bronze history — every record that ever arrived is available for replay. If Silver or Gold pipelines produce wrong data, the Bronze source is intact and complete. Overwriting Bronze destroys the ability to replay from raw data. A — partitioning improves query efficiency but doesn’t enable replay. C — Parquet is already the Delta format. D — compression affects storage cost, not replayability.


Q43. Answer: B

On first run with no existing checkpoint, Auto Loader treats all files in the source directory as new and processes them all. The checkpoint records all 1 million files as processed. On subsequent runs, only files that arrived after the first run’s checkpoint are processed. A — Auto Loader processes existing files by default; cloudFiles.includeExistingFiles=false would skip them. C — Auto Loader handles pre-existing files. D — schema sampling is a separate operation from file processing.


Q44. Answer: B

Lakeflow Connect’s incremental sync cursor records last_sync_time. On each run, it fetches records where updated_at > last_sync_time. Records backdated to 2 hours ago have updated_at timestamps that fall before the current cursor position. The query WHERE updated_at > cursor_time doesn't return them. They exist in the source but are invisible to the sync. A — cursors track forward position only; there's no automatic backward scan for backdated records. C — Lakeflow Connect doesn't detect clock drift. D — Lakeflow Connect uses modification timestamps for incremental sync, not record IDs.


Q45. Answer: B

COPY INTO is specifically designed for idempotent batch file loading — its load history prevents re-processing already-loaded files. 10,000 files per day is within COPY INTO’s efficient operating range (load history scaling issues appear at hundreds of thousands or millions of accumulated files). A — Auto Loader is preferred for high-frequency streaming ingestion, not necessarily all use cases. C — COPY INTO’s load history is the idempotency guarantee. D — Auto Loader with availableNow=True and a checkpoint is also idempotent, but COPY INTO's idempotency is simpler for this batch use case.


Q46. Answer: B

When Lakeflow Connect hits an API rate limit, it enters a backoff state and waits for the rate limit window to reset. During backoff, the pipeline shows RUNNING — not FAILED — because it hasn’t given up. The extended runtime with no errors is the diagnostic signature of rate limit backoff. A — unusually large batches would show faster progress, not a 3-hour stall. C — full re-sync would typically show higher data transfer rates. D — Delta OCC conflicts would show errors, not extended silent running.


Q47. Answer: C

Unity Catalog masking, row filters, and access controls apply at the query layer — they’re enforced when queries execute through Databricks. Direct S3 access via AWS CLI bypasses the Databricks query layer entirely. The only security control that prevents this is IAM policy restrictions on the S3 bucket, limiting access to authorized service principals. A — RLS operates at query time; S3 API calls don’t go through the query engine. B — Delta files are standard Parquet — no automatic encryption. D — UC doesn’t encrypt files by default.


Q48. Answer: C

5 million events per hour at JSON file delivery to ADLS is a high-frequency, high-volume streaming ingestion scenario. Auto Loader with file notification mode handles event-driven file arrival with low latency and scales to high file counts without directory listing overhead. trigger(processingTime="5 minutes") processes files every 5 minutes. A — Lakeflow Connect handles enterprise SaaS APIs, not file-based object storage ingestion. B — COPY INTO is batch; hourly runs introduce 60-minute latency for a high-frequency source. D — JDBC reads from a database, not object storage.


Q49. Answer: A

Auto Loader with cloudFiles.format = json and cloudFiles.inferColumnTypes = true samples incoming JSON files to infer the schema including nested structures. The inferred schema is stored in schemaLocation and reused on subsequent runs. B — Auto Loader does support nested JSON schema inference. C — Auto Loader infers the nested structure but does not automatically flatten it; flattening requires explicit transformation code. D — nested JSON is not reduced to a single STRING column.


Q50. Answer: C

Salesforce and ServiceNow are enterprise SaaS systems with REST APIs — Lakeflow Connect standard connectors handle authentication, pagination, rate limiting, and incremental sync for both. PostgreSQL is a JDBC database — either the Lakeflow Connect database connector (if available for the PostgreSQL version) or a direct JDBC read orchestrated via a Lakeflow Job. A — Auto Loader requires files in object storage; it cannot connect to Salesforce, ServiceNow, or PostgreSQL. B — COPY INTO requires files in object storage. D — Auto Loader cannot read from a PostgreSQL database.


Score Interpretation


🔥 Next in Series

Part 15 - Practice Exam 2: PySpark, Medallion Architecture, Spark Tuning, and Lakeflow Jobs

50 more scenario-based questions covering the transformation, optimization, and orchestration domains. The questions get progressively harder — the Spark UI diagnostic scenarios, skew identification, and Lakeflow Jobs trigger type questions are the ones most candidates find most challenging in the actual exam.


Tags