Databricks & Lakehouse
Databricks Data Engineer Associate: Complete Exam Revision Sheet
DataForge Series: Databricks Data Engineer Associate - Part 13 of 16
This is not a summary of the series. It’s a surgical extraction of exactly what the exam tests — every decision rule, every mechanism, every trap answer pattern — organized for rapid review before you sit.
Work through this once slowly to identify gaps. Then use it as a 30-minute pre-exam reference. Every item here has appeared in exam scenarios. None of it is padding.

Domain 1: Delta Lake and the Lakehouse
The Core Mechanism
Delta Lake is not a file format. Parquet is the file format. Delta Lake is a transaction log (_delta_log/) layered on top of Parquet files. The log is the source of truth — not the files.
Every write produces a commit entry in _delta_log/ containing ADD and REMOVE actions for Parquet files. The current table state is the set of active files after replaying all commits from the last checkpoint.
Checkpoints are written every 10 commits as Parquet snapshots of the full active file set. They prevent log replay from scanning every commit since table creation.
ACID Guarantees — What Each Means

Isolation model: Optimistic Concurrency Control (OCC). Not traditional locking. Concurrent writes detect conflicts at commit time and retry. High-concurrency MERGE/UPDATE workloads need careful partition design.
Time Travel
SELECT * FROM events VERSION AS OF 5;
SELECT * FROM events TIMESTAMP AS OF '2024-01-15';
RESTORE TABLE events TO VERSION AS OF 5;How it works: log replay to the requested version. Returns the active file set at that point. Does NOT require physical file retention — only works within the retention window.
Retention window: controlled by delta.logRetentionDuration (default 7 days). VACUUM physically deletes files outside the retention window. After VACUUM runs, older versions become inaccessible.
The exam trap: VACUUM is destructive. Set retention before running VACUUM, not after data is already gone.
Schema Enforcement vs Evolution

Type changes are never automatically handled by schema evolution. A column shifting from INTEGER to STRING requires explicit schema migration before the write succeeds.
Key Decision Rules
DROP TABLEon managed table → data deletedDROP TABLEon external table → metadata only, data survivesVACUUMdeletes files → time travel beyond window impossible- Schema enforcement on by default — evolution requires explicit opt-in
- Delta works with multiple engines (Spark, Trino, Athena) — open format advantage
Domain 2: Unity Catalog
Three-Level Namespace
catalog.schema.table
prod.silver.events
dev.raw.events_landing
ml_platform.features.user_embeddingsCatalog = environment or domain boundary. Schema = processing layer. Table/View/Volume = the object.
One metastore per cloud region per account. All workspaces in the region share the same metastore.
The Three Required Grants — Never Forget This
GRANT USE CATALOG ON CATALOG prod TO `analysts`; -- required
GRANT USE SCHEMA ON SCHEMA prod.gold TO `analysts`; -- required
GRANT SELECT ON TABLE prod.gold.customers TO `analysts`; -- requiredMissing any one → query fails. The error often says “schema not found” or “permission denied” — not “missing USE CATALOG.” This is the most common exam trap in the security domain.
Managed vs External Tables

Use managed for: Silver/Gold tables your pipelines own entirely. Use external for: raw landing zones, shared data, tables that must outlive pipeline configuration.
DENY Semantics
Explicit DENY overrides inherited GRANT. A user in a group with SELECT who also has an explicit DENY cannot query the table — the DENY wins regardless of group grants.
Lineage
Unity Catalog captures column-level lineage automatically for all Databricks-executed operations. External writers (direct S3 writes) create lineage gaps — invisible to the graph.
Domain 3: Compute
Compute Type Decision Matrix

SQL Warehouse Types

Photon: C++ vectorized engine. Benefits SQL queries on Delta. Does NOT benefit PySpark-heavy workloads.
DBU Cost Model
Total Cost = DBU rate × instance DBUs/hour × runtime hours × nodes
All-purpose > job cluster DBU rate
Serverless highest DBU rate but zero idle costThe exam cost trap: lowest DBU rate ≠ lowest total cost. An all-purpose cluster at higher DBU rate idling for 6 hours costs more than a job cluster at lower DBU rate running for 2 hours.
Autoscaling Failure Modes
- Mid-shuffle autoscaling → shuffle restarts → job takes longer
- Scale-down between stages → scale-up again next stage → oscillation overhead
min_workersalways billing — autoscaling between 2–10 workers always charges for at least 2
Rule: fixed worker counts for predictable ETL. Autoscaling for variable load (SQL Warehouses, shared dev clusters).
Cluster Policies
JSON templates that enforce guardrails — maximum workers, required autotermination, approved instance types. The answer when an exam scenario asks “how to prevent engineers from creating arbitrarily large clusters.”
Domain 4: Ingestion Patterns
Source Type → Mechanism Matching (Non-Negotiable)

Auto Loader ≠ API source. Lakeflow Connect ≠ object storage. These are never interchangeable on the exam.
Auto Loader Key Facts
- Uses checkpoint directory to track processed files — exactly-once semantics with Delta
- Two discovery modes: directory listing (default, simpler) vs file notification (S3 SQS/ADLS Event Grid — lower latency, high scale)
- Schema stored in
schemaLocation— inferred on first run, reused on subsequent runs trigger(availableNow=True)— processes all pending files then stops — the exam's batch-mode Auto Loader pattern
Schema Evolution Modes

Type changes fail regardless of evolution mode. addNewColumns handles new columns, not type changes.
COPY INTO Key Facts
- Maintains load history inside Delta table metadata — idempotent
- Running COPY INTO multiple times on same source is safe (already-loaded files skipped)
- Concurrent COPY INTO to same table → OCC conflicts (not traditional locks)
- Scaling wall: load history scan becomes expensive at very high file counts
- Right for: bounded batch loads, scheduled idempotent runs
- Wrong for: high-frequency streaming, very high file counts
Lakeflow Connect Key Facts
- Sync cursor = persistent watermark tracking last synced position
- Cursor advances atomically with Delta commit — failure rolls back to last committed position
- Incremental sync: captures inserts and updates. Does NOT capture hard deletes.
- CDC mode: captures inserts, updates, AND deletes via source change log
- Standard connectors: Databricks-maintained SLA. Managed connectors: partner-maintained SLA.
- Rate limit backoff → pipeline shows RUNNING, not FAILED — common diagnostic trap
The Bronze Ingestion Philosophy
Bronze prioritizes completeness over correctness. Land everything. Preserve _rescued_data. Never filter at Bronze. Never overwrite Bronze. Replayability requires Bronze to be complete.
Domain 5: PySpark Transformations
Join Strategy Selection

Broadcast threshold default: 10MB. Spark may broadcast tables estimated below this — but only with accurate statistics. Stale statistics → optimizer may miss broadcast opportunity.
Force broadcast:
from pyspark.sql.functions import broadcast
result = large_df.join(broadcast(small_df), on="key")Data Skew: The Exam Scenario
Diagnostic signature: median shuffle read 400MB, max 5.1GB. Most tasks finish in 30 seconds, one task runs for 47 minutes. This is the official exam guide Sample Question 1 pattern.
Root cause: hash function sends disproportionate rows to one partition (usually NULL/default key values).
Fixes in order:
- AQE skew join:
spark.sql.adaptive.skewJoin.enabled = true(automatic, no code change) - Salting: artificially increase key cardinality (code change, for extreme skew)
- Filter and union: isolate skewed key, apply broadcast join separately
Wrong fixes: adding more executors, reducing shuffle partitions, increasing executor memory — none address the distribution problem.
union() vs union() + distinct()
PySpark union() does NOT deduplicate. It's equivalent to SQL UNION ALL. For deduplication, call .distinct() explicitly. Missing this produces silent duplicate rows in Silver tables.
approx_count_distinct vs countDistinct
approx_count_distinct: HyperLogLog, ~2% error, much faster and cheaper. countDistinct: exact but expensive shuffle of all distinct values.
Exam rule: when scenario says “approximate results acceptable” → approx_count_distinct. When exact count required (billing, compliance) → countDistinct.
Deduplication Pattern
# Keep latest record per business key — correct pattern
window = Window.partitionBy("event_id").orderBy(desc("_ingested_at"))
df_deduped = df.withColumn("rn", row_number().over(window)) \
.filter(col("rn") == 1).drop("rn")
# dropDuplicates keeps arbitrary record - use when recency doesn't matter
df_deduped = df.dropDuplicates(["event_id"])Domain 6: Medallion Architecture
Layer Contracts — Memorize These

Deduplication belongs at Silver, not Bronze. Bronze preserves duplicates as a record of what arrived. Silver cleans them.
Gold Layer Object Selection

Materialized view: pre-computed results stored in Delta, auto-refreshed. Use for expensive aggregations read frequently by BI. NOT for real-time requirements.
Streaming table vs materialized view: streaming table = continuous/triggered ingestion of new data. Materialized view = pre-computed query results refreshed on schedule/change.
Data Quality Enforcement
Block (fail loudly): Silver table not updated, downstream gets stale but correct data, alert fires. Quarantine: valid records write to Silver, invalid records write to silver.events_quarantine with _quarantine_reason column.
Exam rule: the scenario requirements determine which approach is correct — both are valid answers depending on whether pipeline continuity or strict correctness is the stated requirement.
Domain 7: Spark Tuning
The Five Exam Parameters

shuffle.partitions calibration: target 128–256MB per partition. (data_size_GB × 1024) / 200 = target_partitions.
OOM Type Decision Matrix

Critical distinction: container OOM (“executor lost”) looks like network failure. It’s memory. Always check memoryOverhead before investigating networking.
AQE Configuration
spark.conf.set("spark.sql.adaptive.enabled", "true")
spark.conf.set("spark.sql.adaptive.skewJoin.enabled", "true") # separate setting
spark.conf.set("spark.sql.adaptive.coalescePartitions.enabled", "true")AQE enabled ≠ skew join handling enabled. Two separate settings. The exam tests this — a scenario where AQE is on but the skew problem persists has skewJoin.enabled as the missing configuration.
Liquid Clustering vs Z-order

Predictive Optimization: applies to Unity Catalog managed tables only. External tables require manual OPTIMIZE/VACUUM scheduling.
Domain 8: Lakeflow Jobs
Trigger Type Decision Rules

The exam’s most common trigger scenario: pipeline runs before data arrives → wrong trigger type. File arrival trigger is the fix, not “adjust the schedule to run later.”
Retry Semantics
- Retries handle transient failures (network blips, cluster startup)
- Retries do NOT fix logic errors (NullPointerException, wrong SQL)
- Each retry = fresh task execution from the beginning
- High retry count + long intervals = SLA buffer consumed before final failure
Exam rule: scenario describing a task that fails due to a code error + asking how to make it succeed = fix the code, not increase retries.
UPSTREAM_FAILED
UPSTREAM_FAILED means a dependency didn’t complete successfully. It is NOT the actual failure — it’s the downstream consequence. Always trace back to the original failed task before investigating.
Branching — Outcome Conditions
"depends_on": [{"task_key": "validate", "outcome": "SUCCESS"}]
"depends_on": [{"task_key": "validate", "outcome": "FAILED"}]Without branching: a failed validation either blocks all downstream tasks or alerts run unconditionally. Branching routes execution correctly based on what actually happened.
Reliability Priority Order
- Trigger correctness — runs at wrong time if wrong
- Outcome validation — silent zero-record success if missing
- Branching logic — failures route incorrectly if absent
- Retry behavior — SLA collapse under sustained failures
- Monitoring — problems detected too late
Fix in this order. Sophisticated monitoring on a pipeline with the wrong trigger type is monitoring a pipeline that’s silently wrong.
Domain 9: CI/CD with DABs
DABs Core Concepts
Bundle: directory with databricks.yml + resource definitions + source code. Defines jobs, clusters, notebooks, permissions as code.
Targets: environment definitions in databricks.yml. Each target specifies workspace host + variable overrides. Same codebase, different configuration per environment.
Variable resolution: ${var.catalog} resolves to dev, staging, or prod based on deployment target. Table references, cluster sizes, credentials all resolve automatically.
Deployment Commands
databricks bundle validate --target staging # catch errors before deploy
databricks bundle deploy --target prod # deploy to environment
databricks bundle run job_name --target prod # run after deployment
databricks bundle destroy --target dev # remove bundle resourcesvalidate before deploy is non-optional in CI/CD. Catches variable resolution errors before any resources are created.
Git Folders vs DABs — The Exam’s Most Common Confusion

Exam rule: “use Git Folders to deploy to production” = WRONG. Git Folders is for development. DABs handles deployment.
run_as Service Principal
Production jobs must run as a service principal — not an individual engineer’s identity. Jobs depending on personal credentials fail when that person leaves. Service principals provide stable, auditable machine identities.
State Drift
After bundle deployment, the workspace UI is read-only. Manual edits after deployment diverge the workspace from the bundle. The next bundle deploy overwrites manual changes. Emergency hotfixes must be committed to Git and redeployed to persist.
schedule_pause_status
dev: schedule_pause_status: PAUSED # never auto-runs
staging: schedule_pause_status: PAUSED # never auto-runs
prod: schedule_pause_status: UNPAUSED # runs on scheduleMissing this → staging jobs run on schedule → staging data contamination.
Domain 10: Troubleshooting
Spark UI Navigation
Always start with Stages tab, not Jobs tab. Jobs tab tells you a job is slow. Stages tab tells you which stage and why.
Task metrics to read first: Duration distribution, Shuffle Read distribution, Spill (Disk), GC Time.
Diagnostic Signature Patterns

OOM Fast Reference
- “Java heap space” in executor log →
executor.memory - “Executor lost” / “RPC disconnect” →
executor.memoryOverhead(Python) - “Java heap space” in driver log →
driver.memory+ fix.collect()
Cluster Startup Failures
Instrument: cluster event log — NOT Spark UI (which only shows running task metrics).
Common causes:
- Init script failure (library version mismatch, CUDA suffix wrong, private registry)
- Library conflict (installed package conflicts with DBR pre-installed version)
- Node acquisition failure (cloud capacity constraint — try different instance type or AZ)
Library conflict diagnostic path: check cluster Libraries tab for Error status → check DBR release notes for pre-installed versions → pin conflicting dependency to compatible version.
The Wrong Fix Pattern
The exam consistently presents scenarios where a plausible but incorrect fix was applied:
- Adding executors when problem is skew → doesn’t fix distribution
- Increasing
executor.memorywhen problem is container OOM → wrong memory region - Checking network when executors are killed by memory → wrong root cause
- Increasing retries when task fails due to code error → retries don’t fix logic
Exam skill: identify which fix addresses the root cause vs which addresses a symptom.
Domain 11: Security and Governance
The Four Security Layers
- Privilege hierarchy (GRANT/REVOKE) — who can access which objects
- Column masking — what value a column returns per identity
- Row-level security — which rows are visible per identity
- ABAC — policies that follow data tags automatically
All four required for complete security. Missing any one layer creates silent exposure.
The Three Required Grants Pattern (Again — It’s That Important)
GRANT USE CATALOG ON CATALOG prod TO `analysts`;
GRANT USE SCHEMA ON SCHEMA prod.gold TO `analysts`;
GRANT SELECT ON TABLE prod.gold.customers TO `analysts`;Missing USE CATALOG or USE SCHEMA → query fails with misleading error message.
Column Masking vs Row-Level Security

Masking = row still returned, column value transformed. RLS = row excluded entirely, user doesn’t know it exists.
ABAC
Policies follow data tags, not table structure. Tag a column pii=true → masking policy applies automatically. New sensitive columns are protected when tagged — no manual masking function required per column.
ABAC vs explicit masking:
- Explicit masking: column-specific transformation (SSN show last 4, email mask local part)
- ABAC: uniform treatment across all columns sharing a sensitivity class
External Table Security Gap
Unity Catalog masking and RLS apply at the query layer. Direct S3/ADLS reads bypass UC entirely. A user with direct object storage access to an external table’s LOCATION gets unmasked data regardless of UC privileges.
Fix: restrict direct storage access to infrastructure service principals only. Analysts access data through UC, never through direct object storage.
Masking Numeric Columns
-- CORRECT: return NULL for numeric columns (aggregations work)
RETURN CASE WHEN is_account_group_member('hr') THEN salary ELSE NULL END;
-- WRONG: return string for numeric column (SUM/AVG breaks)
RETURN CASE WHEN is_account_group_member('hr') THEN salary ELSE '***' END;Service Principals and Masking
A service principal running a pipeline receives masked column values unless it is a member of the privileged group in the masking function. Add the service principal to the appropriate group for automated jobs that need unmasked data for processing.
Trap Answer Patterns: The Exam’s Recurring Tricks
These patterns appear across multiple exam domains. Recognize them and eliminate wrong answers faster.
Trap 1 — “Add more compute” for a skew problem. More executors don’t fix skew. They give you more executors each processing an imbalanced partition. The fix is always distribution (AQE, salting, filter-union), not scale.
Trap 2 — “Use Git Folders for deployment.” Git Folders is a development environment. DABs is the deployment mechanism. The exam will present Git Folders as a plausible deployment option. It’s never correct for environment promotion.
Trap 3 — Scheduled trigger for variable data arrival. Time-based triggers run regardless of data readiness. When a scenario describes late-arriving data causing missing results, the answer is always a data-driven trigger (file arrival or table update) — not adjusting the schedule.
Trap 4 — Retries for logic errors. Retries are for transient infrastructure failures. A task that fails due to a NullPointerException will fail on every retry. Adding retries adds latency and cost without changing the outcome.
Trap 5 — SELECT grant without traversal grants. SELECT on a table is unreachable without USE CATALOG and USE SCHEMA on parent levels. Any scenario describing a user who “has SELECT but can’t query the table” has missing traversal grants as the root cause.
Trap 6 — union() deduplicates. PySpark union() does not deduplicate. It's UNION ALL. Missing .distinct() produces silent duplicates in Silver tables. The exam will describe unexpected duplicates with no pipeline error — this is the cause.
Trap 7 — AQE enabled = skew handled. spark.sql.adaptive.enabled = true enables AQE. spark.sql.adaptive.skewJoin.enabled = trueenables skew join handling — a separate parameter. AQE on without skewJoin enabled won't fix a skew problem.
Trap 8 — Git revert = full rollback. Git revert restores pipeline configuration. It does NOT roll back Delta table schemas, Auto Loader checkpoints, or already-processed data. Treating rollback as a complete undo is wrong — data repair may be required in addition to configuration rollback.
Trap 9 — COPY INTO is streaming. COPY INTO is batch. It maintains load history for idempotency but has no streaming semantics. For high-frequency file arrival, Auto Loader is correct.
Trap 10 — Managed connector SLA = Databricks SLA. Standard connectors (Databricks-maintained) have Databricks SLA coverage. Managed connectors (partner-maintained) have partner SLA. The exam tests who owns the fix when a connector breaks after an API version change.
Quick-Reference: Key SQL and Code Patterns
Delta Lake Operations
-- Time travel
SELECT * FROM table VERSION AS OF 5;
SELECT * FROM table TIMESTAMP AS OF '2024-01-15';
RESTORE TABLE table TO VERSION AS OF 5;
-- Schema
ALTER TABLE table ADD COLUMN new_col STRING;
ALTER TABLE table SET TBLPROPERTIES ('delta.logRetentionDuration' = '30 days');
-- Maintenance
OPTIMIZE table ZORDER BY (col1, col2);
VACUUM table RETAIN 168 HOURS;
ANALYZE TABLE table COMPUTE STATISTICS FOR ALL COLUMNS;
-- Liquid Clustering
CREATE TABLE table USING DELTA CLUSTER BY (col1, col2);
ALTER TABLE table CLUSTER BY (col1, col2);
OPTIMIZE table; -- applies clustering automaticallyUnity Catalog Security
-- Grants
GRANT USE CATALOG ON CATALOG prod TO `group`;
GRANT USE SCHEMA ON SCHEMA prod.gold TO `group`;
GRANT SELECT ON ALL TABLES IN SCHEMA prod.gold TO `group`;
GRANT CREATE TABLE ON SCHEMA prod.silver TO `service-principal`;
REVOKE SELECT ON TABLE prod.gold.customers FROM `group`;
DENY SELECT ON TABLE prod.gold.pii_table TO `contractors`;
SHOW GRANTS ON TABLE prod.gold.customers;
-- Masking
CREATE OR REPLACE FUNCTION catalog.schema.mask_ssn(ssn STRING)
RETURNS STRING
RETURN CASE WHEN is_account_group_member('pii-access') THEN ssn
ELSE CONCAT('***-**-', RIGHT(ssn, 4)) END;
ALTER TABLE prod.gold.customers ALTER COLUMN ssn
SET MASK catalog.schema.mask_ssn;
-- Row filter
ALTER TABLE prod.gold.sales
SET ROW FILTER catalog.schema.region_filter ON (region);
-- ABAC tagging
ALTER TABLE prod.gold.customers ALTER COLUMN ssn
SET TAGS ('pii' = 'true', 'sensitivity' = 'high');Auto Loader
df = spark.readStream \
.format("cloudFiles") \
.option("cloudFiles.format", "json") \
.option("cloudFiles.schemaLocation", "s3://bucket/checkpoints/schema") \
.option("cloudFiles.schemaEvolutionMode", "addNewColumns") \
.load("s3://bucket/raw/")
df.writeStream \
.format("delta") \
.option("checkpointLocation", "s3://bucket/checkpoints/stream") \
.trigger(availableNow=True) \ # batch mode with checkpoint semantics
.start("s3://bucket/delta/table")Spark Tuning
# Shuffle partitions
spark.conf.set("spark.sql.shuffle.partitions", "400")
# AQE with skew handling
spark.conf.set("spark.sql.adaptive.enabled", "true")
spark.conf.set("spark.sql.adaptive.skewJoin.enabled", "true")
spark.conf.set("spark.sql.adaptive.coalescePartitions.enabled", "true")
# Memory
spark.conf.set("spark.executor.memory", "8g")
spark.conf.set("spark.executor.memoryOverhead", "2g")
spark.conf.set("spark.driver.memory", "4g")
# Broadcast
spark.conf.set("spark.sql.autoBroadcastJoinThreshold", str(100 * 1024 * 1024))DABs CLI
databricks bundle validate --target staging
databricks bundle deploy --target prod
databricks bundle run job_name --target prod
databricks bundle destroy --target devExam Strategy: How to Use This Material
On each question:
- Read the full scenario — every requirement stated matters
- Identify the domain (Delta, ingestion, compute, transform, orchestration, CI/CD, security)
- Identify the specific mechanism being tested
- Eliminate wrong answers by finding which requirement each fails
- The correct answer satisfies ALL stated requirements simultaneously
On multi-requirement scenarios:
The exam’s wrong answers always satisfy some requirements and fail others. A scenario requiring audit trails + consistency + ML access + BI access has exactly one answer that satisfies all four. Read every requirement before eliminating options.
On performance scenarios:
The answer is always the fix that addresses the root cause, not the symptom. Adding compute rarely fixes a distribution problem. Increasing memory rarely fixes a configuration mismatch. Read the metric, identify the root cause, match to the correct fix.
On “which tool” scenarios:
Source type determines ingestion tool. Workload type determines compute type. Environment promotion determines CI/CD mechanism. These matchings are non-negotiable — the exam tests whether you confuse them.
30-Minute Final Review Checklist
Read through once. Check what you know cold. Star what you’re
uncertain about. Spend your remaining time only on the starred items.
Delta Lake and Storage
□ Delta Lake is a transaction log (`_delta_log/`) on top of Parquet — not a file format
□ `DROP TABLE` on managed table → data deleted
□ `DROP TABLE` on external table → metadata only, data survives
□ `VACUUM` deletes old files → time travel beyond retention window impossible
□ Schema enforcement is ON by default — evolution requires explicit opt-in
□ `mergeSchema` handles new columns — does NOT handle type changes
□ Checkpoints written every 10 commits — prevent full log replay on read
□ OCC = optimistic concurrency control — not traditional locking
Unity Catalog and Security
□ Three-level namespace: `catalog.schema.table`
□ SELECT grant requires USE CATALOG + USE SCHEMA to be reachable
□ DENY overrides GRANT — always, at any hierarchy level
□ Managed tables: UC controls data lifecycle
□ External tables: direct S3/ADLS access bypasses all UC security
□ Column masking = transforms value, row still returned
□ Row-level security = row hidden entirely, user doesn’t know it exists
□ ABAC = policies follow data tags automatically — new tagged columns protected without manual mask
□ Service principals need group membership to receive unmasked values in pipelines
Compute
□ Job cluster = scheduled ETL, ephemeral, terminates on completion
□ All-purpose cluster = interactive dev, persists, accumulates idle cost
□ SQL Warehouse = SQL analytics only — cannot run arbitrary PySpark
□ Serverless SQL Warehouse cold start = 5–10 seconds (not 2–3 minutes)
□ Photon benefits SQL queries — does NOT benefit PySpark workloads
□ Lower DBU rate ≠ lower total cost — idle time changes the math
□ Cluster policies = the answer for enforcing guardrails across a team
Ingestion
□ Files in object storage → Auto Loader (streaming) or COPY INTO (batch)
□ Enterprise SaaS APIs → Lakeflow Connect
□ Auto Loader ≠ API source — cannot connect to Salesforce/Workday
□ COPY INTO = idempotent, load history tracked, NOT streaming
□ Concurrent COPY INTO = OCC conflicts, not traditional locks
□ Auto Loader `addNewColumns` handles new columns, NOT type changes
□ `trigger(availableNow=True)` = batch mode with checkpoint semantics
□ Lakeflow Connect incremental sync = inserts + updates, NOT hard deletes
□ CDC mode required to capture hard deletes
□ Standard connector SLA = Databricks. Managed connector SLA = partner.
□ Bronze = completeness over correctness — append-only, never overwrite
PySpark Transformations
□ Broadcast join threshold default = 10MB (estimated size, requires fresh stats)
□ `union()` does NOT deduplicate — equivalent to UNION ALL
□ `approx_count_distinct` = ~2% error, much faster than `countDistinct`
□ Skew fix order: AQE skewJoin first, salting second, filter-union third
□ Adding executors does NOT fix data skew
□ Sort-merge join = default for large-large joins — two shuffles
□ `explain()` before optimizing — find Exchange nodes first
Medallion Architecture
□ Bronze = completeness, append-only, preserve `_rescued_data`
□ Silver = correctness, deduplicate on business key, validate before write
□ Gold = fitness for purpose, separate objects per consumer pattern
□ Deduplication belongs at Silver — not Bronze, not Gold
□ Materialized view = pre-computed, auto-refreshed, for BI query performance
□ Streaming table = continuous/triggered ingestion of new data
□ Regular view on large Silver = every dashboard refresh re-runs full aggregation
Spark Tuning
□ `shuffle.partitions` default 200 = wrong for most production workloads
□ Target 128–256MB per partition after shuffle
□ AQE enabled ≠ skew join handling enabled (separate parameter)
□ “Executor lost” / “RPC disconnect” = container OOM → `memoryOverhead` (not network)
□ “Java heap space” in executor = `executor.memory`
□ “Java heap space” in driver = `driver.memory` + fix `.collect()`
□ Liquid Clustering = incremental, flexible, no rigid partition dirs
□ Z-order = manual OPTIMIZE, rewrites all data, stable for existing tables
□ Predictive Optimization = managed tables only, not external tables
Lakeflow Jobs
□ File arrival trigger = runs when files arrive, not on clock schedule
□ Table update trigger = runs when upstream table changes
□ Wrong trigger type = the root cause of “pipeline succeeded but data missing”
□ Retries fix transient failures — NOT logic errors (NullPointerException won’t retry away)
□ UPSTREAM_FAILED = dependency didn’t complete — trace back to the actual failed task
□ Branching requires explicit `outcome: “SUCCESS”` and `outcome: “FAILED”` conditions
□ Zero-record ingestion reports SUCCESS — outcome validation prevents silent empty runs
CI/CD with DABs
□ DABs = deployment mechanism (jobs, clusters, configs as code)
□ Git Folders = development environment — NOT a deployment mechanism
□ `databricks bundle validate` before `databricks bundle deploy` — always
□ `run_as: service_principal_name` in prod target = correct production identity model
□ `schedule_pause_status: PAUSED` in dev/staging — never auto-run outside prod
□ Manual UI edits after deployment = state drift — overwritten on next deploy
□ Git revert = configuration rollback only — does NOT roll back data or checkpoints
Troubleshooting
□ Open Stages tab first — not Jobs tab
□ Max task duration >> median = skew (not uniform slowness)
□ Shuffle Spill (Disk) > 0 = partitions too large for executor memory
□ Check physical plan with `explain()` before any optimization
□ Cluster event log = startup failures and init script errors (not Spark UI)
□ Library conflict = check DBR pre-installed versions, pin to compatible version
□ “Compliance passed / No alerts” + wrong data = silent success failure mode
🔥 Next in Series
Parts 14, 15, 16–150 Practice Questions
Practice Exam 1: Delta Lake, Unity Catalog, Compute, and Ingestion Patterns
Three sets of 50 questions. Written the way the real exam is written — scenario-based, with wrong answers that are architecturally plausible and require actual reasoning to eliminate.
Each question includes a full explanation of why the correct answer is right and why each wrong answer fails at least one requirement. The explanations are the learning — not just the answer key.
Part 14: Delta Lake, Unity Catalog, Compute, Ingestion Patterns (50 questions) Part 15: PySpark, Medallion Architecture, Spark Tuning, Lakeflow Jobs (50 questions) Part 16: CI/CD with DABs, Troubleshooting, Security and Governance (50 questions)
Tags
#databricks-certification #exam-revision #data-engineer-associate #delta-lake #unity-catalog #spark-tuning #lakeflow-jobs #dabs #troubleshooting #security-governance #dataforge