πŸ”

DATA-ENGINEER-PROFESSIONAL β€” all questions

110 practice questions with answers and explanations.

Topic 1 Β· Question 1

An upstream system has been configured to pass the date for a given batch of data to the Databricks Jobs API as a parameter. The notebook to be scheduled will use this parameter to load data with the following code: df = spark.read.format("parquet").load(f"/mnt/source/(date)") Which code block should be used to create the date Python variable used in the above code block?

  • Adate = spark.conf.get("date")
  • Binput_dict = input() date= input_dict["date"]
  • Cimport sys date = sys.argv[1]
  • Ddate = dbutils.notebooks.getParam("date")
  • Edbutils.widgets.text("date", "null") date = dbutils.widgets.get("date") (correct answer)
Reveal answer & explanation
Correct answer: E

The correct answer is E. Option E: dbutils.widgets.text("date", "null") date = dbutils.widgets.get("date")

Topic 1 Β· Question 2

The Databricks workspace administrator has configured interactive clusters for each of the data engineering groups. To control costs, clusters are set to terminate after 30 minutes of inactivity. Each user should be able to execute workloads against their assigned clusters at any time of the day. Assuming users have been added to a workspace but not granted any permissions, which of the following describes the minimal permissions a user would need to start and attach to an already configured cluster.

  • A"Can Manage" privileges on the required cluster
  • BWorkspace Admin privileges, cluster creation allowed, "Can Attach To" privileges on the required cluster
  • CCluster creation allowed, "Can Attach To" privileges on the required cluster
  • D"Can Restart" privileges on the required cluster (correct answer)
  • ECluster creation allowed, "Can Restart" privileges on the required cluster
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: "Can Restart" privileges on the required cluster

Topic 1 Β· Question 3

The data engineering team has configured a Databricks SQL query and alert to monitor the values in a Delta Lake table. The recent_sensor_recordings table contains an identifying sensor_id alongside the timestamp and temperature for the most recent 5 minutes of recordings. The below query is used to create the alert: The query is set to refresh each minute and always completes in less than 10 seconds. The alert is set to trigger when mean (temperature) > 120. Notifications are triggered to be sent at most every 1 minute. If this alert raises notifications for 3 consecutive minutes and then stops, which statement must be true?

Exhibit 1 for question 3
  • AThe total average temperature across all sensors exceeded 120 on three consecutive executions of the query
  • BThe recent_sensor_recordings table was unresponsive for three consecutive runs of the query
  • CThe source query failed to update properly for three consecutive minutes and then restarted
  • DThe maximum temperature recording for at least one sensor exceeded 120 on three consecutive executions of the query
  • EThe average temperature recordings for at least one sensor exceeded 120 on three consecutive executions of the query (correct answer)
Reveal answer & explanation
Correct answer: E

The correct answer is E. Option E: The average temperature recordings for at least one sensor exceeded 120 on three consecutive executions of the query

Explanation

Retrieval-augmented generation grounds model responses in retrieved enterprise data to improve relevance and reduce unsupported claims.

Topic 1 Β· Question 4

A Delta table of weather records is partitioned by date and has the below schema: date DATE, device_id INT, temp FLOAT, latitude FLOAT, longitude FLOAT To find all the records from within the Arctic Circle, you execute a query with the below filter: latitude > 66.3 Which statement describes how the Delta engine identifies which files to load?

  • AAll records are cached to an operational database and then the filter is applied
  • BThe Parquet file footers are scanned for min and max statistics for the latitude column
  • CAll records are cached to attached storage and then the filter is applied
  • DThe Delta log is scanned for min and max statistics for the latitude column (correct answer)
  • EThe Hive metastore is scanned for min and max statistics for the latitude column
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: The Delta log is scanned for min and max statistics for the latitude column

Topic 1 Β· Question 5

The data engineering team has configured a job to process customer requests to be forgotten (have their data deleted). All user data that needs to be deleted is stored in Delta Lake tables using default table settings. The team has decided to process all deletions from the previous week as a batch job at 1am each Sunday. The total duration of this job is less than one hour. Every Monday at 3am, a batch job executes a series of VACUUM commands on all Delta Lake tables throughout the organization. The compliance officer has recently learned about Delta Lake's time travel functionality. They are concerned that this might allow continued access to deleted data. Assuming all delete logic is correctly implemented, which statement correctly addresses this concern?

  • ABecause the VACUUM command permanently deletes all files containing deleted records, deleted records may be accessible with time travel for around 24 hours.
  • BBecause the default data retention threshold is 24 hours, data files containing deleted records will be retained until the VACUUM job is run the following day.
  • CBecause Delta Lake time travel provides full access to the entire history of a table, deleted records can always be recreated by users with full admin privileges.
  • DBecause Delta Lake's delete statements have ACID guarantees, deleted records will be permanently purged from all storage systems as soon as a delete job completes.
  • EBecause the default data retention threshold is 7 days, data files containing deleted records will be retained until the VACUUM job is run 8 days later. (correct answer)
Reveal answer & explanation
Correct answer: E

The correct answer is E. Option E: Because the default data retention threshold is 7 days, data files containing deleted records will be retained until the VACUUM job is run 8 days later.

Explanation

VACUUM removes old unreferenced Delta files after the retention period, reducing storage while preserving time-travel safety.

Topic 1 Β· Question 6

A junior data engineer has configured a workload that posts the following JSON to the Databricks REST API endpoint 2.0/jobs/create. Assuming that all configurations and referenced resources are available, which statement describes the result of executing this workload three times?

Exhibit 1 for question 6
  • AThree new jobs named "Ingest new data" will be defined in the workspace, and they will each run once daily.
  • BThe logic defined in the referenced notebook will be executed three times on new clusters with the configurations of the provided cluster ID.
  • CThree new jobs named "Ingest new data" will be defined in the workspace, but no jobs will be executed. (correct answer)
  • DOne new job named "Ingest new data" will be defined in the workspace, but it will not be executed.
  • EThe logic defined in the referenced notebook will be executed three times on the referenced existing all purpose cluster.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Three new jobs named "Ingest new data" will be defined in the workspace, but no jobs will be executed.

Topic 1 Β· Question 7

An upstream system is emitting change data capture (CDC) logs that are being written to a cloud object storage directory. Each record in the log indicates the change type (insert, update, or delete) and the values for each field after the change. The source table has a primary key identified by the field pk_id. For auditing purposes, the data governance team wishes to maintain a full record of all values that have ever been valid in the source system. For analytical purposes, only the most recent value for each record needs to be recorded. The Databricks job to ingest these records occurs once per hour, but each individual record may have changed multiple times over the course of an hour. Which solution meets these requirements?

  • ACreate a separate history table for each pk_id resolve the current state of the table by running a union all filtering the history tables for the most recent state.
  • BUse MERGE INTO to insert, update, or delete the most recent entry for each pk_id into a bronze table, then propagate all changes throughout the system.
  • CIterate through an ordered set of changes to the table, applying each in turn; rely on Delta Lake's versioning ability to create an audit log.
  • DUse Delta Lake's change data feed to automatically process CDC data from an external system, propagating all changes to all dependent tables in the Lakehouse.
  • EIngest all log information into a bronze table; use MERGE INTO to insert, update, or delete the most recent entry for each pk_id into a silver table to recreate the current table state. (correct answer)
Reveal answer & explanation
Correct answer: E

The correct answer is E. Option E: Ingest all log information into a bronze table; use MERGE INTO to insert, update, or delete the most recent entry for each pk_id into a silver table to recreate the current table state.

Explanation

The bronze layer preserves raw ingested data for replay, auditing, and downstream refinement. The silver layer contains validated, deduplicated, and conformed data suitable for downstream analysis. MERGE INTO atomically applies inserts, updates, and deletes to a Delta table and is the standard pattern for upserts and change-data capture.

Topic 1 Β· Question 8

A table in the Lakehouse named customer_churn_params is used in churn prediction by the machine learning team. The table contains information about customers derived from a number of upstream sources. Currently, the data engineering team populates this table nightly by overwriting the table with the current valid values derived from upstream data sources. The churn prediction model used by the ML team is fairly stable in production. The team is only interested in making predictions on records that have changed in the past 24 hours. Which approach would simplify the identification of these changed records?

  • AApply the churn model to all rows in the customer_churn_params table, but implement logic to perform an upsert into the predictions table that ignores rows where predictions have not changed.
  • BConvert the batch job to a Structured Streaming job using the complete output mode; configure a Structured Streaming job to read from the customer_churn_params table and incrementally predict against the churn model.
  • CCalculate the difference between the previous model predictions and the current customer_churn_params on a key identifying unique customers before making new predictions; only make predictions on those customers not in the previous predictions.
  • DModify the overwrite logic to include a field populated by calling spark.sql.functions.current_timestamp() as data are being written; use this field to identify records written on a particular date.
  • EReplace the current overwrite logic with a merge statement to modify only those records that have changed; write logic to make predictions on the changed records identified by the change data feed. (correct answer)
Reveal answer & explanation
Correct answer: E

The correct answer is E. Option E: Replace the current overwrite logic with a merge statement to modify only those records that have changed; write logic to make predictions on the changed records identified by the change data feed.

Topic 1 Β· Question 9

A table is registered with the following code: Both users and orders are Delta Lake tables. Which statement describes the results of querying recent_orders?

Exhibit 1 for question 9
  • AAll 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.
  • BAll logic will execute when the table is defined and store the result of joining tables to the DBFS; this stored data will be returned when the table is queried. (correct answer)
  • CResults will be computed and cached when the table is defined; these cached results will incrementally update as new records are inserted into source tables.
  • DAll 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.
  • EThe versions of each source table will be stored in the table transaction log; query results will be saved to DBFS with each query.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: All logic will execute when the table is defined and store the result of joining tables to the DBFS; this stored data will be returned when the table is queried.

Topic 1 Β· Question 10

A production workload incrementally applies updates from an external Change Data Capture feed to a Delta Lake table as an always-on Structured Stream job. When data was initially migrated for this table, OPTIMIZE was executed and most data files were resized to 1 GB. Auto Optimize and Auto Compaction were both turned on for the streaming production job. Recent review of data files shows that most data files are under 64 MB, although each partition in the table contains at least 1 GB of data and the total table size is over 10 TB. Which of the following likely explains these smaller file sizes?

  • ADatabricks has autotuned to a smaller target file size to reduce duration of MERGE operations (correct answer)
  • BZ-order indices calculated on the table are preventing file compaction
  • CBloom filter indices calculated on the table are preventing file compaction
  • DDatabricks has autotuned to a smaller target file size based on the overall size of data in the table
  • EDatabricks has autotuned to a smaller target file size based on the amount of data in each partition
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Databricks has autotuned to a smaller target file size to reduce duration of MERGE operations This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 11

A data architect has designed a system in which two Structured Streaming jobs will concurrently write to a single bronze Delta table. Each job is subscribing to a different topic from an Apache Kafka source, but they will write data with the same schema. To keep the directory structure simple, a data engineer has decided to nest a checkpoint directory to be shared by both streams. The proposed directory structure is displayed below: Which statement describes whether this checkpoint directory structure is valid for the given scenario and why?

Exhibit 1 for question 11
  • ANo; Delta Lake manages streaming checkpoints in the transaction log.
  • BYes; both of the streams can share a single checkpoint directory.
  • CNo; only one stream can write to a Delta Lake table.
  • DYes; Delta Lake supports infinite concurrent writers.
  • ENo; each of the streams needs to have its own checkpoint directory. (correct answer)
Reveal answer & explanation
Correct answer: E

The correct answer is E. Option E: No; each of the streams needs to have its own checkpoint directory.

Explanation

A streaming checkpoint stores progress and state so a query can recover without reprocessing committed data. This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 12

A Structured Streaming job deployed to production has been experiencing delays during peak hours of the day. At present, during normal execution, each microbatch of data is processed in less than 3 seconds. During peak hours of the day, execution time for each microbatch becomes very inconsistent, sometimes exceeding 30 seconds. The streaming write is currently configured with a trigger interval of 10 seconds. Holding all other variables constant and assuming records need to be processed in less than 10 seconds, which adjustment will meet the requirement?

  • ADecrease the trigger interval to 5 seconds; triggering batches more frequently allows idle executors to begin processing the next batch while longer running tasks from previous batches finish.
  • BIncrease the trigger interval to 30 seconds; setting the trigger interval near the maximum execution time observed for each batch is always best practice to ensure no records are dropped.
  • CThe trigger interval cannot be modified without modifying the checkpoint directory; to maintain the current stream state, increase the number of shuffle partitions to maximize parallelism.
  • DUse the trigger once option and configure a Databricks job to execute the query every 10 seconds; this ensures all backlogged records are processed with each batch.
  • EDecrease the trigger interval to 5 seconds; triggering batches more frequently may prevent records from backing up and large batches from causing spill. (correct answer)
Reveal answer & explanation
Correct answer: E

The correct answer is E. Option E: Decrease the trigger interval to 5 seconds; triggering batches more frequently may prevent records from backing up and large batches from causing spill. This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 13

Which statement describes Delta Lake Auto Compaction?

  • AAn asynchronous job runs after the write completes to detect if files could be further compacted; if yes, an OPTIMIZE job is executed toward a default of 1 GB.
  • BBefore a Jobs cluster terminates, OPTIMIZE is executed on all tables modified during the most recent job.
  • COptimized writes use logical partitions instead of directory partitions; because partition boundaries are only represented in metadata, fewer small files are written.
  • DData is queued in a messaging bus instead of committing data directly to memory; all data is committed from the messaging bus in one batch once the job is complete.
  • EAn asynchronous job runs after the write completes to detect if files could be further compacted; if yes, an OPTIMIZE job is executed toward a default of 128 MB. (correct answer)
Reveal answer & explanation
Correct answer: E

The correct answer is E. Option E: An asynchronous job runs after the write completes to detect if files could be further compacted; if yes, an OPTIMIZE job is executed toward a default of 128 MB.

Explanation

OPTIMIZE compacts small Delta files to improve data-skipping and query performance.

Topic 1 Β· Question 14

A Delta Lake table representing metadata about content posts from users has the following schema: user_id LONG, post_text STRING, post_id STRING, longitude FLOAT, latitude FLOAT, post_time TIMESTAMP, date DATE This table is partitioned by the date column. A query is run with the following filter: longitude -20 Which statement describes how data will be filtered?

  • AStatistics in the Delta Log will be used to identify partitions that might Include files in the filtered range.
  • BNo file skipping will occur because the optimizer does not know the relationship between the partition column and the longitude.
  • CThe Delta Engine will use row-level statistics in the transaction log to identify the flies that meet the filter criteria.
  • DStatistics in the Delta Log will be used to identify data files that might include records in the filtered range. (correct answer)
  • EThe Delta Engine will scan the parquet file footers to identify each row that meets the filter criteria.
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Statistics in the Delta Log will be used to identify data files that might include records in the filtered range.

Topic 1 Β· Question 15

A small company based in the United States has recently contracted a consulting firm in India to implement several new data engineering pipelines to power artificial intelligence applications. All the company's data is stored in regional cloud storage in the United States. The workspace administrator at the company is uncertain about where the Databricks workspace used by the contractors should be deployed. Assuming that all data governance considerations are accounted for, which statement accurately informs this decision?

  • ADatabricks runs HDFS on cloud volume storage; as such, cloud virtual machines must be deployed in the region where the data is stored.
  • BDatabricks workspaces do not rely on any regional infrastructure; as such, the decision should be made based upon what is most convenient for the workspace administrator.
  • CCross-region reads and writes can incur significant costs and latency; whenever possible, compute should be deployed in the same region the data is stored. (correct answer)
  • DDatabricks leverages user workstations as the driver during interactive development; as such, users should always use a workspace deployed in a region they are physically near.
  • EDatabricks notebooks send all executable code from the user’s browser to virtual machines over the open internet; whenever possible, choosing a workspace region near the end users is the most secure.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Cross-region reads and writes can incur significant costs and latency; whenever possible, compute should be deployed in the same region the data is stored.

Topic 1 Β· Question 16

The downstream consumers of a Delta Lake table have been complaining about data quality issues impacting performance in their applications. Specifically, they have complained that invalid latitude and longitude values in the activity_details table have been breaking their ability to use other geolocation processes. A junior engineer has written the following code to add CHECK constraints to the Delta Lake table: A senior engineer has confirmed the above logic is correct and the valid ranges for latitude and longitude are provided, but the code fails when executed. Which statement explains the cause of this failure?

Exhibit 1 for question 16
  • ABecause another team uses this table to support a frequently running application, two-phase locking is preventing the operation from committing.
  • BThe activity_details table already exists; CHECK constraints can only be added during initial table creation.
  • CThe activity_details table already contains records that violate the constraints; all existing data must pass CHECK constraints in order to add them to an existing table. (correct answer)
  • DThe activity_details table already contains records; CHECK constraints can only be added prior to inserting values into a table.
  • EThe current table schema does not contain the field valid_coordinates; schema evolution will need to be enabled before altering the table to add a constraint.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: The activity_details table already contains records that violate the constraints; all existing data must pass CHECK constraints in order to add them to an existing table.

Topic 1 Β· Question 17

Which of the following is true of Delta Lake and the Lakehouse?

  • ABecause Parquet compresses data row by row. strings will only be compressed when a character is repeated multiple times.
  • BDelta Lake automatically collects statistics on the first 32 columns of each table which are leveraged in data skipping based on query filters. (correct answer)
  • CViews in the Lakehouse maintain a valid cache of the most recent versions of source tables at all times.
  • DPrimary and foreign key constraints can be leveraged to ensure duplicate values are never entered into a dimension table.
  • EZ-order can only be applied to numeric values stored in Delta Lake tables.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Delta Lake automatically collects statistics on the first 32 columns of each table which are leveraged in data skipping based on query filters.

Explanation

Delta Lake adds ACID transactions, schema enforcement, time travel, and reliable batch and streaming operations to a data lake. Retrieval-augmented generation grounds model responses in retrieved enterprise data to improve relevance and reduce unsupported claims.

Topic 1 Β· Question 18

A CHECK constraint has been successfully added to the Delta table named activity_details using the following logic: A batch job is attempting to insert new records to the table, including a record where latitude = 45.50 and longitude = 212.67. Which statement describes the outcome of this batch insert?

Exhibit 1 for question 18
  • AThe write will fail when the violating record is reached; any records previously processed will be recorded to the target table.
  • BThe write will fail completely because of the constraint violation and no records will be inserted into the target table. (correct answer)
  • CThe write will insert all records except those that violate the table constraints; the violating records will be recorded to a quarantine table.
  • DThe write will include all records in the target table; any violations will be indicated in the boolean column named valid_coordinates.
  • EThe write will insert all records except those that violate the table constraints; the violating records will be reported in a warning log.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: The write will fail completely because of the constraint violation and no records will be inserted into the target table.

Topic 1 Β· Question 19

A junior data engineer has manually configured a series of jobs using the Databricks Jobs UI. Upon reviewing their work, the engineer realizes that they are listed as the "Owner" for each job. They attempt to transfer "Owner" privileges to the "DevOps" group, but cannot successfully accomplish this task. Which statement explains what is preventing this privilege transfer?

  • ADatabricks jobs must have exactly one owner; "Owner" privileges cannot be assigned to a group. (correct answer)
  • BThe creator of a Databricks job will always have "Owner" privileges; this configuration cannot be changed.
  • COther than the default "admins" group, only individual users can be granted privileges on jobs.
  • DA user can only transfer job ownership to a group if they are also a member of that group.
  • EOnly workspace administrators can grant "Owner" privileges to a group.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Databricks jobs must have exactly one owner; "Owner" privileges cannot be assigned to a group.

Topic 1 Β· Question 20

All records from an Apache Kafka producer are being ingested into a single Delta Lake table with the following schema: key BINARY, value BINARY, topic STRING, partition LONG, offset LONG, timestamp LONG There are 5 unique topics being ingested. Only the "registration" topic contains Personal Identifiable Information (PII). The company wishes to restrict access to PII. The company also wishes to only retain records containing PII in this table for 14 days after initial ingestion. However, for non-PII information, it would like to retain these records indefinitely. Which of the following solutions meets the requirements?

  • AAll data should be deleted biweekly; Delta Lake's time travel functionality should be leveraged to maintain a history of non-PII information.
  • BData should be partitioned by the registration field, allowing ACLs and delete statements to be set for the PII directory.
  • CBecause the value field is stored as binary data, this information is not considered PII and no special precautions should be taken.
  • DSeparate object storage containers should be specified based on the partition field, allowing isolation at the storage level.
  • EData should be partitioned by the topic field, allowing ACLs and delete statements to leverage partition boundaries. (correct answer)
Reveal answer & explanation
Correct answer: E

The correct answer is E. Option E: Data should be partitioned by the topic field, allowing ACLs and delete statements to leverage partition boundaries.

Explanation

Retrieval-augmented generation grounds model responses in retrieved enterprise data to improve relevance and reduce unsupported claims.

Showing questions 1–20 of 110 Β· Page 1 of 6