Free Databricks Data Engineer Professional questions
Try these before reading the answers. The mix follows the weighting, so code and optimisation appear most.
Question 1. A PySpark job joins a 2 TB fact table with a 40 MB dimension table. The job spends most of its time shuffling. What is the most effective change?
- A. Increase the cluster size
- B. Broadcast the small dimension table to avoid shuffling the fact table
- C. Repartition the fact table before the join
- D. Cache the fact table in memory
Show answer
Answer: B
Broadcasting the small dimension table sends it to every executor and eliminates the shuffle of the large table, which is what dominates the runtime. A larger cluster shuffles the same volume faster at greater cost, repartitioning the fact table adds another shuffle, and caching the fact table consumes memory without removing the join shuffle.
Question 2. A transformation uses a Python UDF to apply a simple string operation to every row of a large DataFrame. Performance is poor. What is the most appropriate change?
- A. Replace the UDF with an equivalent built-in Spark SQL function
- B. Increase the cluster size
- C. Cache the DataFrame before applying the UDF
- D. Increase the number of partitions
Show answer
Answer: A
A Python UDF forces per-row serialisation between the JVM and Python, which is the cause of the slowdown, and a built-in Spark SQL function performs the same work natively. A larger cluster pays more for the same inefficiency, caching does not remove per-row overhead, and more partitions multiplies the overhead.
Question 3. A pipeline completes successfully every night, but downstream users report that a key metric has been wrong for two weeks. What monitoring gap does this reveal?
- A. Cluster CPU and memory metrics were not collected
- B. Job run duration was not being tracked
- C. User login auditing was not enabled
- D. Data quality expectations were not validated and alerted on, only job success
Show answer
Answer: D
Job success only confirms the code ran, so data quality expectations must be validated and alerted on separately to catch a pipeline that succeeds while producing wrong output. Cluster metrics, run duration and login auditing would not surface an incorrect metric.
Question 4. An organisation must let a partner company query a subset of its tables without copying data out or granting access to its workspace. Which capability addresses this?
- A. Export the tables to cloud storage and share the location
- B. Create accounts for partner staff in the workspace
- C. Delta Sharing to the partner organisation
- D. A nightly extract emailed to the partner
Show answer
Answer: C
Delta Sharing provides cross-organisation data sharing without copying data or granting workspace access, which is exactly the stated constraint. Exporting to cloud storage copies the data, a partner workspace account grants access, and a nightly extract duplicates and goes stale.
Question 5. A dimension table must retain the history of attribute changes so that historical facts join to the values that were current at the time. Which modelling approach is required?
- A. Overwrite the dimension row on each change
- B. A type 2 slowly changing dimension with validity dates
- C. A type 1 slowly changing dimension
- D. Store the attribute history in the fact table
Show answer
Answer: B
A slowly changing dimension of type 2 adds a new row with validity dates when an attribute changes, preserving history for point-in-time joins. Overwriting loses history, a type 1 dimension also overwrites, and a fact table is not where dimension history belongs.
How did you do?
Notice how many turn on efficiency and correctness rather than whether something works at all. That is the gap between this exam and the Associate: a working pipeline is assumed, and the questions ask whether it is a good one.
If questions 1 and 2 felt uncertain, that is the 35% covered by code and optimisation — see weeks 1 to 3 of the study plan.