DATA-ENG-PRO Data Engineer Professional Practice Questions
Prepare for DATA-ENG-PRO with more than an answer.
- Exam fee
- $200 USD
- Level
- Professional
- Valid for
- 2 years
Domains covered on the exam 10
- Developing Code for Data Processing using Python and SQL20%
- Data Ingestion & Acquisition15%
- Data Transformation, Cleansing and Quality20%
- Data Sharing and Federation10%
- Monitoring and Alerting10%
- Cost & Performance Optimization15%
- Ensuring Data Security and Compliance10%
- Data Governance5%
- Debugging and Deploying10%
- Data Modeling10%
- 1
A development team is using Databricks Asset Bundles (DABs) to manage their project deployments. They need to define different compute resources and job parameters for their
developmentandproductionenvironments. For example, the development environment should use a small, single-node cluster, while production requires a large auto-scaling cluster. Which section of thedatabricks.ymlfile is used to define these environment-specific configurations?Show answer details
Correct answer: C
The
targetssection is specifically designed for this purpose. You can define different targets (e.g.,dev,prod) and specify unique configurations, variables, and default settings for each. When deploying, you specify the target (-t dev), and the bundle applies the corresponding configuration. - 2
When configuring an Auto Loader stream, what is the primary purpose of the
.option("cloudFiles.schemaLocation", ...)setting?Show answer details
Correct answer: B
This is the correct purpose. The
schemaLocationis a critical configuration that tells Auto Loader where to store its state, which includes the inferred schema, any evolved schema versions, and progress information. This allows the stream to be fault-tolerant and maintain state across restarts. - 3
A data engineer needs to calculate a 7-day moving average of sales for each product in a large sales dataset. The dataset is ordered by
product_idandsale_date. Which type of Spark function is best suited for this calculation?graph LR A[Input Data] --> B{Partition by product_id}; B --> C{Order by sale_date}; C --> D{Apply Window Function 7-day moving average}; D --> E[Output Data];Show answer details
Correct answer: C
Window functions are specifically designed for this type of calculation. By using
PARTITION BY product_idandORDER BY sale_datewith a frame clause likeROWS BETWEEN 6 PRECEDING AND CURRENT ROW, you can efficiently compute the 7-day moving average for each product in a distributed manner. - 4
A data engineering team has migrated a large, partitioned Delta table to use Liquid Clustering instead. The table is clustered by
user_idandevent_timestamp. After the migration, the team notices that some queries filtering byuser_idare not showing the expected performance improvements. What is a critical operational step that must be performed regularly on a liquid-clustered table to ensure the data layout is continuously optimized and query performance is maintained?Show answer details
Correct answer: B
Liquid Clustering works by incrementally improving the data layout. The
OPTIMIZEcommand is the trigger that performs the actual clustering work, reorganizing data that has been recently ingested or modified. Without regularOPTIMIZEruns, the benefits of Liquid Clustering will not be fully realized as new data will not be clustered. - 5
A data engineer needs to programmatically trigger a Databricks job, pass custom parameters to it, and then monitor its status until completion. Which Databricks tool is most suitable for this automation task from an external system?
Show answer details
Correct answer: C
The Databricks REST API, specifically the Jobs API endpoints (e.g.,
POST /api/2.1/jobs/run-nowandGET /api/2.1/jobs/runs/get), is designed for this exact purpose. It allows for full programmatic control over job execution, parameter passing, and status polling from any external system capable of making HTTP requests. - 6
A data architect is designing a petabyte-scale fact table for an e-commerce platform. The table will store transaction data and will be queried by
product_id,customer_id, andtransaction_date. Thecustomer_idcolumn has very high cardinality (over 100 million unique values), whiletransaction_dateis used for filtering in 90% of queries, often with range scans. The primary goals are to optimize query performance for a wide variety of analytical queries and to minimize ongoing data layout maintenance. Which data layout strategy is most effective for these requirements?Show answer details
Correct answer: B
Liquid Clustering is the optimal solution here. It is designed to handle high-cardinality keys gracefully and adapt the data layout automatically without the rigid boundaries of partitioning. This simplifies maintenance and provides excellent performance across various query patterns.
- 7
A financial institution is using Unity Catalog to govern access to a
transactionstable containing sensitive customer data. The following access rules must be enforced:- Analysts in the
EU_Analystsgroup should only see transactions from European countries. - For all analysts, the
customer_full_namecolumn must be masked, showing only the first initial and last name. - Auditors in the
Compliancegroup must see all data, unmasked and unfiltered.
Which TWO actions are required to implement this security model directly in Unity Catalog? (Select TWO)
Show answer details
Correct answer: A, B
This is the correct and modern way to implement row-level security in Unity Catalog. A single function can dynamically filter rows based on the user's group membership, satisfying the regional access requirement.
This correctly implements column-level masking. The function's logic will apply the masking transformation for all users except those in the 'Compliance' group, who will see the original, unmasked data.
- Analysts in the
- 8
A developer is defining a Databricks Asset Bundle (DAB) to deploy a multi-task job. The job includes a task that runs a Python script packaged as a wheel file.
Show answer details
Correct answer: A
True. In a
databricks.ymlfile, apython_wheel_taskcan be directly specified as a task type. Whendatabricks bundle deployis executed, the bundle automatically builds the wheel from the specified source, deploys it to the workspace, and configures the job task to use it. - 9
Company Background:
Streamlytics, a real-time analytics provider, processes IoT sensor data. They have a Spark Structured Streaming job that joins a stream of sensor readings (sensor_stream) with a static dimension table of sensor metadata (sensor_metadata). The job performs an aggregation to calculate the average temperature per sensor type every 5 minutes.Current Architecture:
The streaming job uses a 10-minute watermark on the event timestamp to handle late-arriving data. The state store is located on cloud object storage, and the pipeline runs on an auto-scaling job cluster. This setup has been running efficiently for several months.The Problem:
After a new set of legacy devices were onboarded, the pipeline's performance has severely degraded. Micro-batch processing times have inflated from 30 seconds to over 15 minutes, causing the stream to fall behind. The state store size has grown to several terabytes. An investigation reveals that the legacy devices occasionally send data that is several days late. These records are critical and must eventually be processed for auditing purposes.Business Requirement:
The engineering lead has tasked you with resolving the performance degradation and the massive state size. The solution must not lose the late-arriving data and should avoid a significant increase in steady-state compute costs.Show answer details
Correct answer: D
This is the most robust and cost-effective architectural pattern. It decouples the handling of late-arriving data from the low-latency stream. The streaming job remains fast and efficient with a small state, while the batch job handles the exceptional late data in a more cost-effective manner. This is a common and recommended design pattern.
- 10
A data engineering team has designed a multi-task job in Databricks Workflows to orchestrate their daily ETL process. The job has a linear dependency chain for the main data processing and an independent task for auditing that can run at any time after the start. An engineer needs to add a new task,
generate_reports, which must run only after both thevalidate_dataandprocess_datatasks have successfully completed.Which task dependency configuration correctly implements this requirement?
graph TD A[start_job] --> B[ingest_data]; B --> C[validate_data]; C --> D[process_data]; D --> E[load_warehouse]; A --> F[run_audits];Show answer details
Correct answer: B
This is the correct configuration. By setting multiple upstream dependencies, the
generate_reportstask will only start after all specified parent tasks (validate_dataandprocess_data) have completed successfully, which perfectly matches the requirement.
