A data engineer is implementing Unity Catalog governance for a multi-team environment. Data scientists need interactive clusters for basic data exploration tasks, while automated ETL jobs require dedicated processing. How should the data engineer configure cluster isolation policies to enforce least privilege and ensure Unity Catalog compliance?
-
A
Configure all clusters with NO_ISOLATION_SHARED access modes since Unity Catalog works with any cluster configuration.
-
B
Allow all users to create any cluster type and rely on manual configuration to enable Unity Catalog access modes.
-
C
Create compute policies with STANDARD access mode for interactive workloads and DEDICATED access mode for automated jobs.
-
D
Use only DEDICATED access mode for both interactive workloads and automated jobs to maximize security isolation.
Reveal answer details
Close answer details
Correct answerC
ExplanationCompute policies can enforce access modes instead of relying on each user to configure clusters correctly. STANDARD access mode fits shared interactive exploration, while DEDICATED access mode isolates automated jobs on their assigned compute. Applying those modes through policies gives each workload the intended Unity Catalog-compatible boundary without granting unrestricted cluster creation.
A platform team lead is responsible for automating the individual teams attribution towards SQL Warehouse usage. The requirement is to identify the SQL warehouse usage at the individual user's level and generate a daily report to be shared with an executive team that includes leaders from all business units. How should the platform lead generate an automated report that can be shared daily?
-
A
Use the system tables to capture the audit and billing usage data and share the queries with the executive team. This enables the executives to execute the query and see the latest results any time.
-
B
Use the system tables to capture the audit and billing usage data and create a dashboard with daily refresh schedules and shared with the executive team.
-
C
Restrict users from running any SQL query unless they provide all the query details so that the attribution can be calculated and shared with the executive team.
-
D
Let the users run the SQL query and then directly report the usage to the executives. The ownership of the SQL warehouse usage will be with the individual teams.
Reveal answer details
Close answer details
Correct answerB
ExplanationAudit and billing system tables provide the activity and usage records needed to attribute SQL warehouse consumption to individual users. Building the attribution query into a dashboard gives executives a shared presentation rather than requiring each leader to execute SQL. A daily refresh schedule updates the report automatically at the required cadence and keeps every business unit on the same results.
A member of the data engineering team has submitted a short notebook that they wish to schedule as part of a larger data pipeline. Assume that the commands provided below produce the logically correct results when run as presented.  Which command should be removed from the notebook before scheduling it as a job?
-
A
-
B
-
C
-
D
-
E
Reveal answer details
Close answer details
Correct answerE
ExplanationCmd 6 calls display(finalDF), which is intended for interactive notebook inspection and renders results for a user. A scheduled job does not need that presentation step. The write in Cmd 7 is the action that persists the output, so removing Cmd 6 avoids an unnecessary computation without changing the pipeline result.
A Delta Lake table was created with the below query:  Consider the following query: DROP TABLE prod.sales_by_store If this statement is executed by a workspace admin, which result will occur?
-
A
Nothing will occur until a COMMIT command is executed.
-
B
The table will be removed from the catalog but the data will remain in storage.
-
C
The table will be removed from the catalog and the data will be deleted.
-
D
An error will occur because Delta Lake prevents the deletion of production data.
-
E
Data will be marked as deleted but still recoverable with Time Travel.
Reveal answer details
Close answer details
Correct answerC
ExplanationCREATE TABLE AS SELECT without an explicit external location creates the result as a managed table. The system therefore manages both its catalog metadata and its underlying stored data. When the workspace administrator drops prod.sales_by_store, the catalog entry is removed and the managed data is deleted; no separate COMMIT is required.
The business intelligence team has a dashboard configured to track various summary metrics for retail stores. This includes total sales for the previous day alongside totals and averages for a variety of time periods. The fields required to populate this dashboard have the following schema:  For demand forecasting, the Lakehouse contains a validated table of all itemized sales updated incrementally in near real-time. This table, named products_per_order, includes the following fields:  Because reporting on long-term sales trends is less volatile, analysts using the new dashboard only require data to be refreshed once daily. Because the dashboard will be queried interactively by many users throughout a normal business day, it should return results quickly and reduce total compute associated with each materialization. Which solution meets the expectations of the end users while controlling and limiting possible costs?
-
A
Use the Delta Cache to persist the products_per_order table in memory to quickly update the dashboard with each query.
-
B
Populate the dashboard by configuring a nightly batch job to save the required values as a table overwritten with each update.
-
C
Use Structured Streaming to configure a live dashboard against the products_per_order table within a Databricks notebook.
-
D
Define a view against the products_per_order table and define the dashboard against this view.
Reveal answer details
Close answer details
Correct answerB
ExplanationThe required summaries change slowly and need to be refreshed only once daily. A nightly batch job can calculate the totals and averages once, save the required values in a compact table, and overwrite that materialization on each update. Interactive dashboard queries then read prepared results instead of repeatedly aggregating the near-real-time itemized sales table.
A platform engineer needs to report the resource consumption, categorized by SKU tier, across all workspaces. The engineer decides to use the system.billing.usage system table to create a query. Which SQL query will accurately return the daily usage by product?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationDaily usage by product requires three aligned operations: truncate usage_start_time to the day, group by that day and sku_name, and sum usage_quantity. The query using date_trunc, SUM(usage_quantity), and both grouping columns returns one total for each product SKU per day. Counting records would measure rows, not consumed usage.
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?
-
A
Because another team uses this table to support a frequently running application, two-phase locking is preventing the operation from committing.
-
B
The activity_details table already exists; CHECK constraints can only be added during initial table creation.
-
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.
-
D
The activity_details table already contains records; CHECK constraints can only be added prior to inserting values into a table.
-
E
The 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 details
Close answer details
Correct answerC
ExplanationAdding a CHECK constraint to an existing table requires every existing row to satisfy the proposed expression. If activity_details already contains an out-of-range latitude or longitude, the constraint cannot be established because the table would begin in a violating state. Existing data must first be corrected or removed; the mere presence of rows does not prohibit adding a constraint.
The following table consists of items found in user carts within an e-commerce website.  The following MERGE statement is used to update this table using an updates view, with schema evaluation enabled on this table.   How would the following update be handled?
-
A
The update is moved to separate ''restored'' column because it is missing a column expected in the target schema.
-
B
The new restored field is added to the target schema, and dynamically read as NULL for existing unmatched records.
-
C
The update throws an error because changes to existing columns in the target schema are not supported.
-
D
The new nested field is added to the target schema, and files underlying existing records are updated to include NULL values for the new field.
Reveal answer details
Close answer details
Correct answerB
ExplanationWith schema evolution enabled, MERGE can extend the target's nested structure with the incoming field. Existing rows that were not matched by this update do not require their underlying files to be rewritten. When those rows are read under the evolved schema, the absent nested field is dynamically resolved as NULL, while the updated row contains its supplied value.
A data engineer wants to automate job monitoring and recovery in Databricks using the Jobs API. They need to list all jobs, identify a failed job, and rerun it. Which sequence of API actions should the data engineer perform?
-
A
Use the jobs list endpoint to list jobs, check job run statuses with jobs runs list, and rerun a failed job using jobs run-now.
-
B
Use the jobs get endpoint to retrieve job details, then use jobs update to rerun failed jobs.
-
C
Use the jobs list endpoint to list jobs, then use the jobs create endpoint to create a new job, and run the new job using jobs run-now.
-
D
Use the jobs cancel endpoint to remove failed jobs, then recreate them with jobs create endpoint and run the new ones.
Reveal answer details
Close answer details
Correct answerA
ExplanationFirst use jobs list to enumerate the configured jobs. Then inspect execution outcomes through jobs runs list so the failed run or its job can be identified from run status. Finally, invoke jobs run-now for that existing job to start another run. Updating, canceling, or recreating the job changes configuration and is unnecessary for monitoring and recovery.
Question 10
Single choice
A data engineer is optimizing a managed table that suffers from data skew and frequently changing query filter columns. The engineer needs to avoid costly data rewrites when query patterns evolve. The table size is under 1TB. How should the data engineer meet this requirement?
-
A
Use Hive-style partitioning, as it provides efficient data skipping and is easy to change partition columns at any time.
-
B
Combine partitioning and Z-ordering to maximize flexibility and minimize maintenance as query patterns change.
-
C
Enable liquid clustering, as it efficiently handles data skew, allows clustering keys to be changed without rewriting existing data, and adapts to evolving query patterns.
-
D
Apply Z-ordering, since it allows flexible reorganization of data layout without rewriting existing files and adapts easily to new filter columns.
Reveal answer details
Close answer details
Correct answerC
ExplanationLiquid clustering is designed for evolving access patterns and skewed data distributions. It permits clustering keys to change as commonly filtered columns change, without requiring all existing data to be rewritten immediately. This avoids the rigid layout and maintenance burden of fixed partitions while allowing later clustering work to improve data skipping for the new query patterns.
Question 11
Single choice
A data engineer has a delta table order with deletion vectors enabled for it. The engineer is attempting to execute the below code: DELETE FROM orders WHERE status = 'cancelled' What should be the behaviour of deletion vectors when the command is executed?
-
A
Files are physically rewritten without the deleted row.
-
B
Rows are marked as deleted both in metadata and in files.
-
C
Rows are marked as deleted in metadata, not in files
-
D
Delta automatically removes all cancelled orders permanently.
Reveal answer details
Close answer details
Correct answerC
ExplanationWith deletion vectors enabled, the DELETE can mark the matching rows as deleted in metadata while leaving the existing data files physically unchanged at that point. Readers consult the deletion information and exclude those rows from query results. This avoids an immediate rewrite of every affected file; physical file rewriting is a separate later optimization step.
Question 12
Single choice
A data engineering team is setting up deployment automation. To deploy workspace assets remotely using the Databricks CLI command, they must configure it with proper authentication. Which authentication approach will provide the highest level of security?
-
A
Use a service principal and its Personal Access Token
-
B
Use a service principal with OAuth token federation
-
C
Use a service principal ID and its OAuth client secret
-
D
Use a shared user account and its OAuth client secret
Reveal answer details
Close answer details
Correct answerB
ExplanationA service principal gives deployment automation a non-human identity with permissions that can be scoped to the required assets. OAuth token federation allows it to obtain short-lived credentials from a trusted identity relationship instead of storing a personal access token or OAuth client secret. Removing long-lived shared secrets from the automation path provides the strongest security among the listed approaches.
Question 13
Single choice
An organization processes customer data from web and mobile applications. Data includes names, emails phone numbers, and location history. Data arrives both as Batch files from an SFTP drop (daily) and Streaming JSON events from Kafka (real-time). To comply with internal data privacy policies, the following requirements must be met: Personally identifiable information (PII) like email, phone_number, and ip_address must be masked or anonymized before storage Both batch and streaming pipelines must apply consistent PII handling Masking logic must be auditable and reproducible. The masked data must still be usable for downstream analytics. How should the data engineer design a compliant data pipeline on Databricks that supports both batch and streaming modes, applies data masking to PII, and maintains traceability of transformations for audits?
-
A
Ingest both batch and streaming data using Lakeflow Spark Declarative Pipelines, and apply masking via Unity Catalog column masks at read time to avoid modifying the data during ingestion.
-
B
Load batch data with notebooks and ingest streaming data with SQL Warehouses; use Unity Catalog column masks on Silver tables to redact fields after storage.
-
C
Use Lakeflow Spark Declarative Pipelines for batch and streaming ingestion, define a PII masking function, and apply it during Bronze ingestion before writing to Delta Lake.
-
D
Allow PII to be stored unmasked in Bronze for lineage tracking, then apply masking logic in Gold tables used for reporting.
Reveal answer details
Close answer details
Correct answerC
ExplanationA shared PII masking function in Lakeflow Spark Declarative Pipelines gives the batch and streaming paths the same deterministic transformation. Applying it during Bronze ingestion ensures email, phone_number, and ip_address are masked before records are written to Delta Lake. Declarative pipeline definitions and lineage make the transformation reproducible and traceable while retaining analytics-safe values downstream.
Question 14
Single choice
A data engineer us ingesting JSON files from cloud object storage using Databricks Auto Loader. The source folder may occasionally receive large files of data, which risks overwhelming the stream. To ensure predictable micro-batch sizes, the team wants to throttle ingestion based on the volume of data scanned at 1 GB, regardless of the number of files. Which Auto Loader configuration should the data engineer used to achieve this?
-
A
Configure cloudFiles.maxBytesPerTrigger with 1 GB to place a limit.
-
B
Configure cloudFiles.maxSizePerTrigger with 1 GB to place a limit.
-
C
Configure cloudFiles.maxFilesPerTrigger and estimate the average file size to approximate a size-based throttle of 1 GB.
-
D
Configure cloudFiles.maxPartitionBytes with 1GB to limit data in each partition.
Reveal answer details
Close answer details
Correct answerA
ExplanationcloudFiles.maxBytesPerTrigger controls the amount of source data Auto Loader admits to a micro-batch according to bytes rather than file count. Setting it to 1 GB gives the stream a volume-based ingestion throttle even when file sizes vary substantially. A file-count estimate cannot reliably maintain that volume, and partition-byte settings control processing partitions rather than trigger admission.
Question 15
Single choice
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
-
B
Workspace Admin privileges, cluster creation allowed. "Can Attach To" privileges on the required cluster
-
C
Cluster creation allowed. "Can Attach To" privileges on the required cluster
-
D
"Can Restart" privileges on the required cluster
-
E
Cluster creation allowed. "Can Restart" privileges on the required cluster
Reveal answer details
Close answer details
Correct answerD
ExplanationThe cluster is already configured, so the user does not need permission to create or manage clusters. Because inactivity can terminate it, the missing capability is permission to start it again. "Can Restart" privileges on the required cluster provide that capability and allow the user to resume using the assigned compute without broader administrative rights.
Question 16
Single choice
A junior data engineer is working to implement logic for a Lakehouse table named silver_device_recordings. The source data contains 100 unique fields in a highly nested JSON structure. The silver_device_recordings table will be used downstream to power several production monitoring dashboards and a production model. At present, 45 of the 100 fields are being used in at least one of these applications. The data engineer is trying to determine the best approach for dealing with schema declaration given the highly-nested structure of the data and the numerous fields. Which of the following accurately presents information about Delta Lake and Databricks that may impact their decision-making process?
-
A
The Tungsten encoding used by Databricks is optimized for storing string data; newly-added native support for querying JSON strings means that string types are always most efficient.
-
B
Because Delta Lake uses Parquet for data storage, data types can be easily evolved by just modifying file footer information in place.
-
C
Human labor in writing code is the largest cost associated with data engineering workloads; as such, automating table declaration logic should be a priority in all migration workloads.
-
D
Because Databricks will infer schema using types that allow all observed data to be processed, setting types manually provides greater assurance of data quality enforcement.
-
E
Schema inference and evolution on Databricks ensure that inferred types will always accurately match the data types used by downstream systems.
Reveal answer details
Close answer details
Correct answerD
ExplanationSchema inference selects types capable of processing the values it observes, but that goal is not the same as enforcing the intended business types. Manually declaring the nested fields used by production dashboards and the model establishes explicit type expectations. Values that do not conform can then be detected instead of being accepted through a more permissive inferred schema.
Question 17
Single choice
A data engineer is creating a data ingestion pipeline to understand where customers are taking their rented bicycles during use. The engineer noticed that, over time, data being transmitted from the bicycle sensors fail to include key details like latitude and longitude. Downstream analysts need both the clean records and the quarantined records available for separate processing. The data engineer already has this code:  How should the data engineer meet the requirements to capture good and bad data?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationThe table adds is_quarantined from the negation of the combined latitude and longitude validity rules, so each row is explicitly classified as good or bad. Partitioning on that flag supports separate downstream processing, while @dlt.expect_all records the rule evaluations without dropping failures. Consequently, valid and quarantined records remain available in the same maintained table.
Question 18
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?
-
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.
-
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.
-
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.
-
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.
Reveal answer details
Close answer details
Correct answerD
ExplanationA 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 19
Single choice
A data engineer is working on a Databricks notebook that requires several third-party Python libraries. Some of these are available on PyPI, while others are custom-developed and stored as local.wheel (.whl) and source (.tar.gz) files in an S3 bucket. The goal is to ensure all dependencies are installed and correctly available across multiple jobs running on any automated cluster in a Unity Catalog-enabled workspace. The engineer needs to install the required dependencies in a way that ensures a consistent environment setup across interactive notebooks and jobs and complies with workspace security policies (no internet access). Which approach should the engineer use to install and manage these dependencies while also ensuring reproducibility and compliance?
-
A
Use an init script on the cluster to install all dependencies using pip, referencing the local file system.
-
B
Install all dependencies manually in the driver node of an interactive cluster, then export the environment and reimport on job clusters using %conda.
-
C
Create a Python wheel file for the entire project, upload it to the Databricks Workspace Files or Volumes, and install it using a Cluster Library or pip install in a requirements.txt declared within a Databricks Asset Bundle.
-
D
Use %pip install in every notebook and job to install packages directly from PyPl and custom S3 paths.
Reveal answer details
Close answer details
Correct answerC
ExplanationPackaging the project and its dependencies as a Python wheel creates a versioned, reusable installation unit. Storing the wheel in Workspace Files or a Volume makes it available without internet access, and declaring installation through a cluster library or bundle-managed requirements.txt applies the same dependency setup to automated clusters. This supports reproducible notebook and job environments.
Question 20
Single choice
A data engineering team uses Databricks Lakehouse Monitoring to track the percent_null metric for a critical column in their Delta table. The profile metrics table (prod_catalog.prod_schema.customer_data_profile_metrics) stores hourly percent_null values. The team wants to trigger an alert when the daily average of percent_null exceeds 5% for three consecutive days, while ensuring notifications aren't spammed during sustained issues. Which SQL alert configuration achieves this goal while minimizing false positives and redundant notifications?
-
A
SELECT AVG(percent_null) AS daily_avg FROM prod_catalog.prod_schema.customer_data_profile_metrics WHERE window.end >= CURRENT_TIMESTAMP - INTERVAL '3' DAY Alert Condition: daily_avg > 5 Notification Frequency: Each time alert is evaluated
-
B
SELECT percent_null FROM prod_catalog.prod_schema.customer_data_profile_metrics WHERE window.end >= CURRENT_TIMESTAMP - INTERVAL '1' DAY Alert Condition: percent_null > 5 Notification Frequency: At most every 24 hours
-
C
SELECT SUM(CASE WHEN percent_null > 5 THEN 1 ELSE 0 END) AS violation_days FROM prod_catalog.prod_schema.customer_data_profile_metrics WHERE window.end >= CURRENT_TIMESTAMP - INTERVAL '3' DAY Alert Condition: violation_days >= 3 Notification Frequency: Just once
-
D
WITH daily_avg AS (SELECT DATE_TRUNC('DAY', window.end) AS day, AVG (percent_null) AS avg_null FROM prod_catalog.prod_schema.customer_data_profile_metrics GROUP BY DATE_TRUNC ('DAY', window.end) ) SELECT day, avg_null FROM daily_avg ORDER BY day DESC LIMIT 3 Alert Condition: ALL avg_null > 5 for the latest 3 rows Notification Frequency: Just once
Reveal answer details
Close answer details
Correct answerD
ExplanationThe CTE uses DATE_TRUNC to group hourly observations by day and AVG to calculate one percent_null value per day. Ordering those daily rows in descending order and applying LIMIT 3 isolates the latest three days. Requiring all three averages to exceed 5 enforces consecutive daily violations, while the Just once notification frequency avoids repeated messages during the same sustained condition.
Question 21
Single choice
A data engineer is building a Lakeflow Spark Declarative Pipelines pipeline to process healthcare claims data. A metadata JSON file defines data quality rules for multiple tables, including:  The pipeline must dynamically apply these rules to the claims table without hardcoding the rules. How should the data engineer achieve this?
-
A
Use a SQL CONSTRAINT block referencing the JSON file path.
-
B
Load the JSON metadata, loop through its entries, and apply expectations using dlt.expect_all.
-
C
Invoke an external API to validate records against the metadata rules.
-
D
Reference each expectation with @dlt.expect decorators in the table declaration.
Reveal answer details
Close answer details
Correct answerB
ExplanationThe JSON metadata already supplies each expectation name and constraint, so the pipeline should load that metadata and iterate over its entries to construct the rule mapping dynamically. Passing the resulting collection to dlt.expect_all applies all current claims rules together. Adding or changing a metadata entry can then change validation behavior without adding another hardcoded decorator.
Question 22
Single choice
A data engineering team needs to create a SQL Alert that monitors data quality across multiple columns in their customer table. They want to trigger an alert when both the percentage of customers with missing email addresses exceeds 15% AND the percentage of customers with invalid phone number formats exceeds 10%. Which SQL query pattern is appropriate for implementing this multi-column alert condition?
-
A
SELECT COUNT(*) FROM customers WHERE email IS NULL OR phone_format_invalid = true;
-
B
SELECT email, phone FROM customers WHERE email IS NULL AND phone NOT RLIKE '[0-9-+()\\s]+$';
-
C
SELECT email_null_pct, phone_invalid_pct FROM ( SELECT COUNT(CASE WHEN email IS NULL THEN 1 END) * 100.0 / COUNT(*) AS email_null_pct, COUNT(CASE WHEN phone NOT RLIKE '[0-9-+()\\s]+$' THEN 1 END) * 100.0 / COUNT(*) AS phone_invalid_pct FROM customers );
-
D
SELECT CASE WHEN email_null_pct > 15 AND phone_invalid_pct > 10 THEN 1 ELSE 0 END FROM ( SELECT COUNT(CASE WHEN email IS NULL THEN 1 END) * 100.0 / COUNT(*) AS email_null_pct, COUNT(CASE WHEN phone NOT RLIKE '[0-9-+()\\s]+$' THEN 1 END) * 100.0 / COUNT(*) AS phone_invalid_pct FROM customers ) metrics;
Reveal answer details
Close answer details
Correct answerC
ExplanationA multi-column SQL Alert should combine the individual data-quality metrics into a single alert condition. The inner query calculates the percentage of missing email addresses and invalid phone numbers, while the outer CASE expression returns 1 only when both thresholds are exceeded. The alert can then be configured to trigger when the query result equals 1. Simply returning the two percentages does not itself enforce the required AND condition
Question 23
Single choice
A data engineer is using Lakeflow Spark Declarative Pipelines Expectations feature to track the data quality of their incoming sensor data. Periodically, sensors send bad readings that are out of range, and they are currently flagging those rows with a warning and writing them to the silver table along with the good data. They've been given a new requirement - the bad rows need to be quarantined in a separate quarantine table and no longer included in the silver table. This is the existing code for their silver table:  Which code will satisfy the requirements?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerD
ExplanationThe silver definition must use expect_or_drop with reading less than 120, so rows outside the valid range are removed instead of merely generating warnings. The quarantine definition independently reads the bronze stream and uses expect_or_drop with reading greater than or equal to 120. Thus valid rows remain only in silver, while invalid rows remain only in quarantine.
Question 24
Single choice
A junior data engineer is working to implement logic for a Lakehouse table named silver_device_recordings. The source data contains 100 unique fields in a highly nested JSON structure. The silver_device_recordings table will be used downstream for highly selective joins on a number of fields, and will also be leveraged by the machine learning team to filter on a handful of relevant fields, in total, 15 fields have been identified that will often be used for filter and join logic. The data engineer is trying to determine the best approach for dealing with these nested fields before declaring the table schema. Which of the following accurately presents information about Delta Lake and Databricks that may Impact their decision-making process?
-
A
Because Delta Lake uses Parquet for data storage, Dremel encoding information for nesting can be directly referenced by the Delta transaction log.
-
B
Tungsten encoding used by Databricks is optimized for storing string data: newly-added native support for querying JSON strings means that string types are always most efficient.
-
C
Schema inference and evolution on Databricks ensure that inferred types will always accurately match the data types used by downstream systems.
-
D
By default Delta Lake collects statistics on the first 32 columns in a table; these statistics are leveraged for data skipping when executing selective queries.
Reveal answer details
Close answer details
Correct answerD
ExplanationDelta Lake collects file-level statistics for the first 32 columns by default and uses them for data skipping during selective filters and joins. Because only 15 nested fields are frequently queried, placing those extracted fields within the first 32 columns lets their statistics support skipping. Leaving important values buried outside that range would reduce this optimization opportunity.
Question 25
Single choice
A data engineer is using the AUTO CDC API in Lakeflow Spark Declarative Pipeline to propagate deletions from a source table (orders_source) to a target table (orders_target). The source has Change Data Feed (CDF) enabled, but some delete events arrive out of order due to upstream delays. How does the AUTO CDC API internally ensure deletions are applied correctly despite out-of-order events?
-
A
It ignores deletions if they arrive after updates for the same key.
-
B
It manually sorts incoming events by timestamp before applying changes.
-
C
It runs VACUUM on the target table to purge conflicting records.
-
D
It uses sequence_by to order events and retains tombstones for deleted rows until older sequences are processed.
Reveal answer details
Close answer details
Correct answerD
Explanationsequence_by provides the ordering value used to resolve multiple events for the same key even when arrival order differs from logical order. When a delete is processed, AUTO CDC retains a tombstone rather than immediately forgetting that key. The retained deletion state prevents an older, delayed event from incorrectly recreating the row before all earlier sequence values have been handled.
Question 26
Single choice
The data science team has created and logged a production model using MLflow. The following code correctly imports and applies the production model to output the predictions as a new DataFrame namedpredswith the schema "customer_id LONG, predictions DOUBLE, date DATE".  The data science team would like predictions saved to a Delta Lake table with the ability to compare all predictions across time. Churn predictions will be made at most once per day. Which code block accomplishes this task while minimizing potential compute costs?
-
A
preds.write.mode("append").saveAsTable("churn_preds")
-
B
preds.write.format("delta").save("/preds/churn_preds")
-
C
(preds.writeStream .outputMode("overwrite") .option("checkpointPath", "/_checkpoints/churn_preds") .start("/preds/churn_preds") )
-
D
(preds.write .format("delta") .mode("overwrite") .saveAsTable("churn_preds") )
-
E
(preds.writeStream .outputMode("append") .option("checkpointPath", "/_checkpoints/churn_preds") .table("churn_preds") )
Reveal answer details
Close answer details
Correct answerA
Explanationpreds is a batch DataFrame, and predictions are generated at most once per day, so a batch append is sufficient. preds.write.mode("append").saveAsTable("churn_preds") adds each day's rows without replacing earlier predictions, preserving comparisons across dates. It also avoids the checkpointing and continuously active processing associated with a streaming writer.
Question 27
Single choice
A data company uses Databricks Unity Catalog and has multiple enterprise data sources, including PostgreSQL, Snowflake, and SQL Server. The central data platform team wants to configure Lakehouse Federation so analysts can query external tables directly in Databricks using Databricks SQL, without duplicating data. Which steps are necessary to configure Lakehouse Federation in a secure and governed manner?
-
A
Mirror the external datasets into Delta Lake using Auto Loader, and govern them using Data Lineage and System Tables.
-
B
Configure connections and foreign catalog in Unity Catalog, then grant access to foreign catalogs, schemas, and tables using Unity Catalog permissions.
-
C
Use Partner Connect to create linked datasets, and apply table ACLs at the source system to govern access through Databricks.
-
D
Create external locations and storage credentials to connect to each database, then register foreign tables in Unity Catalog.
Reveal answer details
Close answer details
Correct answerB
ExplanationLakehouse Federation represents each external database through a Unity Catalog connection and exposes its objects through a foreign catalog, allowing queries without copying source data. After creating those objects, administrators grant the required privileges on foreign catalogs, schemas, and tables through Unity Catalog. This centralizes discovery and governed access while the data remains in PostgreSQL, Snowflake, or SQL Server.
Question 28
Single choice
A data engineer is troubleshooting a slow-running Delta Lake query on Databricks SQL involves complex joins and large datasets. They need to identify whether the root cause is related to poor data skipping, inefficient join strategies, or excessive data shuffling. Which approach should identify the specific bottlenecks using native Databricks tools?
-
A
Analyze the Top Operators panel in the Query Profile to identify high-cost operations like BroadcastNestedLoopJoin
-
B
Check the query's execution time in the Jobs UI and correlate it with cluster resource utilization metrics.
-
C
Enable the EXPLAIN command to review the parsed logical plan and manually estimate shuffle sizes.
-
D
Use the LIMIT clause to run a subset of the query and compare execution times with the full dataset.
Reveal answer details
Close answer details
Correct answerA
ExplanationThe Query Profile's Top Operators panel attributes execution cost to concrete operators, making it possible to identify expensive joins, scans, shuffles, and related bottlenecks. A high-cost operator such as BroadcastNestedLoopJoin directly points to an inefficient join strategy, while scan and exchange behavior can reveal data-skipping or shuffle problems. Overall duration alone cannot isolate these causes.
Question 29
Single choice
Given the following PySpark code snippet in a Databricks notebook: filtered_df=spark.read.format("delta").load("/mnt/daya/large_table") \ .filter ("event_date> '2024-01-01'") filtered_df.count () The data engineer notices from the Query Profile that the scan operator for filtered_df is reading almost all files, despite a filter being applied. What is the probable reason for poor data skipping?
-
A
The Delta table lacks optimization that enables dynamic file pruning.
-
B
The filter condition involves a data type that is excluded from data skipping support.
-
C
The filter is executed only after the full data scan, which prevents data skipping from taking place.
-
D
The event_date column is outside the table's partitioning and Z-ordering scheme.
Reveal answer details
Close answer details
Correct answerD
ExplanationData skipping is effective when file-level organization and statistics allow the engine to exclude files for the predicate. If event_date is not represented in the table's partitioning or Z-ordering layout, values for that column may be spread across nearly every file. The date filter is still applied, but it cannot eliminate much input before scanning.
Question 30
Single choice
A data engineer wants to refactor the following DLT code, which includes multiple table definitions with very similar code.  In an attempt to programmatically create these tables using a parameterized table definition, the data engineer writes the following code.  The pipeline runs an update with this refactored code, but generates a different DAG showing incorrect configuration values for these tables. How can the data engineer fix this?
-
A
Wrap the for loop inside another table definition, using generalized names and properties to replace with those from the inner table definition.
-
B
Convert the list of configuration values to a dictionary of table settings, using table names as keys.
-
C
Move the table definition into a separate function, and make calls to this function using different input parameters inside the for loop.
-
D
Load the configuration values for these tables from a separate file, located at a path provided by a pipeline parameter.
Reveal answer details
Close answer details
Correct answerC
ExplanationThe loop-defined function closes over the loop variable, so table definitions can resolve that variable after it has advanced and receive incorrect configuration values. Move the decorated table definition into a separate factory function that accepts the table name as an input. Calling that function for each loop value binds a distinct argument to each generated definition and DAG node.
Question 31
Single choice
A data engineer is configuring a Databricks Asset Bundle to deploy a job with granular permissions. The requirements are: Grant the data-engineers group CAN_MANAGE access to the job. Ensure the auditors' group can view the job but not modify/run it. Avoid granting unintended permissions to other users/groups. How should the data engineer deploy the job while meeting the requirements?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationPermissions belong inside the my-job resource so they apply specifically to the deployed data-pipeline job. The configuration grants data-engineers CAN_MANAGE and auditors CAN_VIEW, exactly matching the two required access levels. It does not add an owner or place a separate top-level permissions block where it would not define the job's resource permissions, so no unintended principal is introduced.
Question 32
Single choice
Which Python variable contains a list of directories to be searched when trying to locate required modules?
-
A
-
B
-
C
-
D
-
E
Reveal answer details
Close answer details
Correct answerB
ExplanationPython stores its module search locations in sys.path, a list of directory strings examined during import resolution. The interpreter checks these entries when locating a requested module or package. The leading comma in the displayed option is extraneous punctuation; the operative variable is sys.path, not an os, PyPI, or importlib resource path.
Question 33
Single choice
A data engineer needs to capture pipeline settings from an existing in the workspace, and use them to create and version a JSON file to create a new pipeline. Which command should the data engineer enter in a web terminal configured with the Databricks CLI?
-
A
Use the get command to capture the settings for the existing pipeline; remove the pipeline_id and rename the pipeline; use this in a create command
-
B
Stop the existing pipeline; use the returned settings in a reset command
-
C
Use the alone command to create a copy of an existing pipeline; use the get JSON command to get the pipeline definition; save this to git
-
D
Use list pipelines to get the specs for all pipelines; get the pipeline spec from the return results parse and use this to create a pipeline
Reveal answer details
Close answer details
Correct answerA
ExplanationThe get command retrieves the existing pipeline settings in a form that can be saved and versioned as JSON. Before using those settings for another pipeline, the existing pipeline_id must be removed because the new object needs its own identity, and the pipeline must be renamed. The adjusted definition can then be supplied to the create command.
Question 34
Single choice
A data engineer is tasked with ensuring that a Delta table in Databricks continuously retains deleted files for 15 days (instead of the default 7 days), in order to permanently comply with the organization's data retention policy. Which code snippet correctly sets this retention period for deleted files?
-
A
spark.sql("ALTER TABLE my_table SET TBLPROPERTIES ('delta.deletedFileRetentionDuration' = 'interval 15 days')")
-
B
-
C
spark.sql("VACUUM my_table RETAIN HOURS")
-
D
spark.conf.set("spark.databricks.delta.deletedFileRetemtionDuration", "15 days")
Reveal answer details
Close answer details
Correct answerA
ExplanationThe ALTER TABLE statement changes the persistent table property delta.deletedFileRetentionDuration to an interval of 15 days. Because the requirement is continuous retention, a table property is the appropriate scope: subsequent cleanup operations observe that configured duration. Deleting table history or issuing a one-time operation would not establish the ongoing policy.
Question 35
Single choice
The following table consists of items found in user carts within an e-commerce website.  The following MERGE statement is used to update this table using an updates view, with schema evolution enabled on this table.  How would the following update be handled? 
-
A
The update throws an error because changes to existing columns in the target schema are not supported.
-
B
The new nested Field is added to the target schema, and dynamically read as NULL for existing unmatched records.
-
C
The update is moved to a separate "rescued" column because it is missing a column expected in the target schema.
-
D
The new nested field is added to the target schema, and files underlying existing records are updated to include NULL values for the new field.
Reveal answer details
Close answer details
Correct answerB
ExplanationWith schema evolution enabled, the coupon member in the incoming items structure is added as a new nested field in the target schema. Existing unmatched records do not need their underlying files rewritten merely to store explicit nulls. When those older records are read using the evolved schema, the absent coupon field is dynamically returned as NULL.
Question 36
Single choice
A company stores account transactions in a Delta Lake table. The company needs to apply frequent account-level correlations (e.g., UPDATE statements) but wants to avoid rewriting entire Parquet files for each change to reduce file churn and improve write performance. Which Delta Lake feature should they enable?
-
A
Enable automatic file compaction on writes
-
B
Enable change data feed on the Delta table
-
C
Partition the Delta table by account_id
-
D
Enable deletion vectors on the Delta table
Reveal answer details
Close answer details
Correct answerD
ExplanationDeletion vectors record row-level invalidations separately from the underlying Parquet data files. An update can use that mechanism to mark the old row state without immediately rewriting the entire file that contains it, reducing file churn for frequent account-level corrections. Other maintenance operations can later incorporate those changes into rewritten files when appropriate.
Question 37
Single choice
Review the following error traceback:  Which statement describes the error being raised?
-
A
The code executed was PySpark but was executed in a Scala notebook
-
B
There is no column in the table named heartrateheartrateheartrate
-
C
There is a type error because a column object cannot be multiplied.
-
D
There is a type error because a DataFrame object cannot be multiplied.
-
E
There is a syntax error because the heartrate column is not correctly identified as a column.
Reveal answer details
Close answer details
Correct answerB
ExplanationIn Python, multiplying the string "heartrate" by 3 produces the concatenated string "heartrateheartrateheartrate". DataFrame.select then interprets that string as a requested column name. The available input contains heartrate but no column with the concatenated name, so analysis fails during column resolution rather than from a DataFrame or column multiplication type error.
Question 38
Single choice
What is the first of a Databricks Python notebook when viewed in a text editor?
-
A
-
B
% Databricks notebook source
-
C
-- Databricks notebook source
-
D
//Databricks notebook source
Reveal answer details
Close answer details
Correct answerB
ExplanationA Databricks Python notebook in source format begins with # Databricks notebook source. The # character is the Python comment marker. %python is a notebook magic command used to specify Python execution in a cell, while -- is the SQL comment syntax and // is commonly used for comments in languages such as Scala. Therefore, # Databricks notebook source is the correct first line for a Python notebook viewed as source text.
Question 39
Single choice
Which statement regarding stream-static joins and static Delta tables is correct?
-
A
Each microbatch of a stream-static join will use the most recent version of the static Delta table as of each microbatch.
-
B
Each microbatch of a stream-static join will use the most recent version of the static Delta table as of the job's initialization.
-
C
The checkpoint directory will be used to track state information for the unique keys present in the join.
-
D
Stream-static joins cannot use static Delta tables because of consistency issues.
-
E
The checkpoint directory will be used to track updates to the static Delta table.
Reveal answer details
Close answer details
Correct answerA
ExplanationIn a stream-static join, the streaming side supplies new rows for each microbatch while the static Delta side is read as a table snapshot. Each microbatch uses the most recent available version of that static table at the time of the microbatch. The static table is therefore not permanently fixed to the version present when the streaming job initialized.
Question 40
Single choice
Two of the most common data locations on Databricks are the DBFS root storage and external object storage mounted with dbutils.fs.mount(). Which of the following statements is correct?
-
A
DBFS is a file system protocol that allows users to interact with files stored in object storage using syntax and guarantees similar to Unix file systems.
-
B
By default, both the DBFS root and mounted data sources are only accessible to workspace administrators.
-
C
The DBFS root is the most secure location to store data, because mounted storage volumes must have full public read and write permissions.
-
D
Neither the DBFS root nor mounted storage can be accessed when using %sh in a Databricks notebook.
-
E
The DBFS root stores files in ephemeral block volumes attached to the driver, while mounted directories will always persist saved data to external storage between sessions.
Reveal answer details
Close answer details
Correct answerA
ExplanationDBFS provides a file-system interface over files stored in object storage, allowing familiar path-based operations with behavior similar to a Unix file system. It is not merely ephemeral driver storage, and mounted object storage does not require public permissions. This abstraction lets users interact with remote storage through consistent file-system syntax.
|