Skip to main content

DATABRICKS-CERTIFIED-PROFESSIONAL-DATA-ENGINEER Real Exam Questions

Databricks Certified Data Engineer Professional

262 questions available · Page 1 of 27

Updated Exam DumpsVerified AnswersPass Guarantee

Get Complete Exam Dumps
Question 1 Single choice

A view is registered with the following code:

Both users and orders are Delta Lake tables.

Which statement describes the results of querying recent_orders?

  1. A

    All logic will execute when the view is defined and store the result of joining tables to the DBFS; this stored data will be returned when the view is queried.

  2. B

    Results will be computed and cached when the view is defined; these cached results will incrementally update as new records are inserted into source tables.

  3. C

    All logic will execute at query time and return the result of joining the valid versions of the source tables at the time the query finishes.

  4. D

    All logic will execute at query time and return the result of joining the valid versions of the source tables at the time the query began.

Show answer and explanation

Correct answer: D

Explanation

A standard view stores query logic rather than materialized join results, so the filtering and join execute when recent_orders is queried. Delta Lake supplies a consistent snapshot of each source table for that query. The returned rows therefore come from the valid table versions at the time the query began, even if concurrent updates finish before it ends.

Question 2 Single choice

A data pipeline uses Structured Streaming to ingest data from Apache Kafka to Delta Lake. Data is being stored in a bronze table, and includes the Kafka-generated timestamp, key, and value. Three months after the pipeline is deployed, the data engineering team has noticed some latency issues during certain times of the day.

A senior data engineer updates the Delta Table's schema and ingestion logic to include the current timestamp (as recorded by Apache Spark) as well as the Kafka topic and partition. The team plans to use these additional metadata fields to diagnose the transient processing delays.

Which limitation will the team face while diagnosing this problem?

  1. A

    New fields will not be computed for historic records.

  2. B

    Spark cannot capture the topic and partition fields from a Kafka source.

  3. C

    New fields cannot be added to a production Delta table.

  4. D

    Updating the table schema will invalidate the Delta transaction log metadata.

  5. E
    Updating the table schema requires a default value provided for each field added.
Show answer and explanation

Correct answer: A

Explanation

Changing the schema and ingestion logic affects records processed after the change; it does not retroactively recalculate values for rows already stored. Historical records therefore lack the newly derived Spark ingestion timestamp and the added Kafka metadata unless a separate backfill rewrites them. This limits comparisons of past and current processing delays.

Question 3 Single choice

A data engineering team needs to implement a tagging system for their tables as part of an automated ETL process, and needs to apply tags programmatically to tables in Unity Catalog.

Which SQL command adds tags to a table programmatically?

  1. A

    ALTER TABLE table_name SET TAGS ('key1' = 'value1', 'key2' = 'value2');

  2. B

    APPLY TAGS ON table_name VALUES ('key1' = 'value1', 'key2' = 'value2')

  3. C

    COMMENT ON TABLE table_name TAGS ('key1' = 'value1', 'key2' = 'value2')

  4. D

    SET TAGS FOR table_name AS ('key1' = 'value1', 'key2' = 'value2')

Show answer and explanation

Correct answer: A

Explanation

Table tags are table metadata, so they are added by altering the existing table and setting key-value tag pairs. The valid form is ALTER TABLE table_name SET TAGS ('key1' = 'value1', 'key2' = 'value2'). This directly applies both tags programmatically; comments and the proposed standalone tag commands do not perform that table alteration.

Question 4 Single choice

What is the retention of job run history?

  1. A

    It is retained until you export or delete job run logs

  2. B

    It is retained for 30 days, during which time you can deliver job run logs to DBFS or S3

  3. C

    It is retained for 60 days, during which you can export notebook run results to HTML

  4. D

    It is retained for 60 days, after which logs are archived

Show answer and explanation

Correct answer: C

Explanation

Job run history remains available for 60 days. During that retention window, notebook run results can be exported to HTML for preservation or review outside the retained run record. The key distinction is that the history is not kept indefinitely and is not described as being archived automatically after the retention period.

Question 5 Single choice

A data engineer is designing a system leveraging Lakeflow Declarative Pipeline technology to process real-time truck telemetry data ingested from JSON files in S3 using Auto Loader. The data includes truck_id, timestamp, location, speed, and fuel_level. The system must support two use cases:

1. Near-real-time monitoring of the latest location, speed, and fuel_level per truck_id for the operations team.

2. Daily aggregated reports of total distance traveled and average fuel efficiency per truck_id for the management team.

Which approach should the data engineer use for streaming tables and materialized views in the Lakeflow Declarative Pipeline to meet these requirements?

  1. A

    Define a streaming table to ingest and store the raw telemetry data, and create a streaming table to compute the daily aggregated distance and fuel efficiency per truck_id reporting. Create a materialized view to compute the latest location, speed, and fuel_level per truck_id for real-time monitoring.

  2. B

    Define a streaming table to ingest and store the raw telemetry data, and create a materialized view to compute the latest location, speed, and fuel_level per truck_id for real-time monitoring. Create another materialized view to compute the daily aggregated distance and fuel efficiency per truck_id for reporting.

  3. C

    Define a streaming table to ingest and store the raw telemetry data, and create a streaming table to incrementally compute the latest location, speed, and fuel_level per truck_id for real-time monitoring. Create a materialized view to compute the daily aggregated distance and fuel efficiency per truck_id for reporting.

  4. D

    Define a materialized view to ingest and store the raw telemetry data, and create a streaming table to compute the latest location, speed, and fuel_level per truck_id for real-time monitoring. Create another materialized view to compute the daily aggregated distance and fuel efficiency per truck_id for reporting.

Show answer and explanation

Correct answer: C

Explanation

A streaming table is appropriate for continuously ingesting and retaining the raw Auto Loader telemetry. Another streaming table can incrementally maintain the latest location, speed, and fuel level per truck for near-real-time operations. The daily distance and fuel-efficiency aggregates are derived reporting results, so a materialized view provides the appropriate maintained batch-style representation.

Question 6 Single choice

The data governance team has instituted a requirement that all tables containing Personal Identifiable Information (PII) must be clearly annotated. This includes adding column comments, table comments, and setting the custom table property "contains_pii" = true.

The following SQL DDL statement is executed to create a new table:

Which command allows manual confirmation that these three requirements have been met?

  1. A

    DESCRIBE EXTENDED dev.pii_test

  2. B

    DESCRIBE DETAIL dev.pii_test

  3. C

    SHOW TBLPROPERTIES dev.pii_test

  4. D

    DESCRIBE HISTORY dev.pii_test

  5. E

    SHOW TABLES dev

Show answer and explanation

Correct answer: A

Explanation

DESCRIBE EXTENDED dev.pii_test returns the table's detailed metadata in one result. That metadata includes the column definitions and their comments, the table-level comment, and table properties such as contains_pii. SHOW TBLPROPERTIES would confirm the custom property but would not also confirm both kinds of comments.

Question 7 Single choice

A data team's Structured Streaming job is configured to calculate running aggregates for item sales to update a downstream marketing dashboard. The marketing team has introduced a new promotion, and they would like to add a new field to track the number of times this promotion code is used for each item. A junior data engineer suggests updating the existing query as follows. Note that proposed changes are in bold.

Original query:

Proposed query:

Which step must also be completed to put the proposed query into production?

  1. A

    Increase the shuffle partitions to account for additional aggregates

  2. B

    Specify a new checkpointlocation

  3. C

    Run REFRESH TABLE delta, /item_agg'

  4. D

    Remove.option (mergeSchema', true') from the streaming write

Show answer and explanation

Correct answer: B

Explanation

The query performs a stateful aggregation with groupBy, so Structured Streaming stores aggregation state and schema information in the checkpoint. Adding new_member_promo changes the state schema of the aggregation. An existing checkpoint cannot safely be reused after this type of stateful query change. A new checkpoint location is required so the stream can initialize state using the new aggregation schema. mergeSchema only handles schema evolution for the Delta output table; it does not make an incompatible streaming checkpoint state schema valid.

Question 8 Multiple choice

A query is taking too long to run. After investigating the Spark UI, the data engineer discovered a significant amount of disk spill. The type of compute instance the data engineer used only provides a core-to-memory ratio of 1:2.

What are the two steps the data engineer should take to minimize spillage? (Choose two.)

  1. A

    Increase spark.sql.files.maxPartitionBytes.

  2. B

    Choose a compute instance with more disk space.

  3. C

    Choose a compute instance with a higher core-to-memory ratio.

  4. D

    Reduce spark.sql.files.maxPartitionBytes.

  5. E

    Choose a compute instance with more network bandwidth.

Show answer and explanation

Correct answers: C, D

Explanation

Disk spill indicates that execution data cannot remain in available memory. Selecting compute with a more favorable core-to-memory ratio gives concurrent tasks more memory for operations such as joins and shuffles. Reducing spark.sql.files.maxPartitionBytes also creates smaller input partitions, lowering each task's working-set requirement. Both changes directly reduce memory pressure that causes spilling.

Question 9 Single choice

A Data engineer wants to run unit's tests using common Python testing frameworks on python functions defined across several Databricks notebooks currently used in production.

How can the data engineer run unit tests against function that work with data in production?

  1. A

    Run unit tests against non-production data that closely mirrors production

  2. B

    Define and unit test functions using Files in Repos

  3. C

    Define units test and functions within the same notebook

  4. D

    Define and import unit test functions from a separate Databricks notebook

Show answer and explanation

Correct answer: B

Explanation

Common Python testing frameworks work naturally with importable Python modules rather than functions scattered across notebook execution contexts. Moving the functions into Files in Repos lets production code and test code import the same modules, organize dependencies, and run through standard test tooling. Tests can then exercise representative non-production data without coupling test execution to production notebooks.

Question 10 Single choice

The business reporting tem requires that data for their dashboards be updated every hour. The total processing time for the pipeline that extracts transforms and load the data for their pipeline runs in 10 minutes.

Assuming normal operating conditions, which configuration will meet their service-level agreement requirements with the lowest cost?

  1. A

    Schedule a jo to execute the pipeline once and hour on a dedicated interactive cluster.

  2. B

    Schedule a Structured Streaming job with a trigger interval of 60 minutes.

  3. C

    Schedule a job to execute the pipeline once hour on a new job cluster.

  4. D

    Configure a job that executes every time new data lands in a given directory.

Show answer and explanation

Correct answer: C

Explanation

The dashboard requires one refresh per hour, while the pipeline completes in only 10 minutes. Scheduling the pipeline as an hourly job on a new job cluster directly meets that interval and allows the compute to terminate after each run. An always-running interactive or streaming cluster would consume resources between the required updates.