πŸ”

DATA-ENGINEER-PROFESSIONAL β€” questions

Page 4 of 6 Β· 110 total questions.

Topic 1 Β· Question 61

A junior data engineer has been asked to develop a streaming data pipeline with a grouped aggregation using DataFrame df. The pipeline needs to calculate the average humidity and average temperature for each non-overlapping five-minute interval. Events are recorded once per minute per device. Streaming DataFrame df has the following schema: "device_id INT, event_time TIMESTAMP, temp FLOAT, humidity FLOAT" Code block: Which line of code correctly fills in the blank within the code block to complete this task?

Exhibit 1 for question 61
  • Ato_interval("event_time", "5 minutes").alias("time")
  • Bwindow("event_time", "5 minutes").alias("time") (correct answer)
  • C"event_time"
  • Dlag("event_time", "10 minutes").alias("time")
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: window("event_time", "5 minutes").alias("time") This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 62

A Structured Streaming job deployed to production has been resulting in higher than expected cloud storage costs. At present, during normal execution, each microbatch of data is processed in less than 3s; at least 12 times per minute, a microbatch is processed that contains 0 records. The streaming write was configured using the default trigger settings. The production job is currently scheduled alongside many other Databricks jobs in a workspace with instance pools provisioned to reduce start-up time for jobs with batch execution. Holding all other variables constant and assuming records need to be processed in less than 10 minutes, which adjustment will meet the requirement?

  • ASet the trigger interval to 3 seconds; the default trigger interval is consuming too many records per batch, resulting in spill to disk that can increase volume costs.
  • BUse the trigger once option and configure a Databricks job to execute the query every 10 minutes; this approach minimizes costs for both compute and storage.
  • CSet the trigger interval to 10 minutes; each batch calls APIs in the source storage account, so decreasing trigger frequency to maximum allowable threshold should minimize this cost. (correct answer)
  • DSet the trigger interval to 500 milliseconds; setting a small but non-zero trigger interval ensures that the source is not queried too frequently.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Set the trigger interval to 10 minutes; each batch calls APIs in the source storage account, so decreasing trigger frequency to maximum allowable threshold should minimize this cost.

Explanation

Retrieval-augmented generation grounds model responses in retrieved enterprise data to improve relevance and reduce unsupported claims. This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 63

Each configuration below is identical to the extent that each cluster has 400 GB total of RAM, 160 total cores and only one Executor per VM. Given an extremely long-running job for which completion must be guaranteed, which cluster configuration will be able to guarantee completion of the job in light of one or more VM failures?

  • Aβ€’ Total VMs: 8 β€’ 50 GB per Executor β€’ 20 Cores / Executor
  • Bβ€’ Total VMs: 16 β€’ 25 GB per Executor β€’ 10 Cores / Executor (correct answer)
  • Cβ€’ Total VMs: 1 β€’ 400 GB per Executor β€’ 160 Cores/Executor
  • Dβ€’ Total VMs: 4 β€’ 100 GB per Executor β€’ 40 Cores / Executor
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: β€’ Total VMs: 16 β€’ 25 GB per Executor β€’ 10 Cores / Executor

Topic 1 Β· Question 64

A task orchestrator has been configured to run two hourly tasks. First, an outside system writes Parquet data to a directory mounted at /mnt/raw_orders/. After this data is written, a Databricks job containing the following code is executed: Assume that the fields customer_id and order_id serve as a composite key to uniquely identify each order, and that the time field indicates when the record was queued in the source system. If the upstream system is known to occasionally enqueue duplicate entries for a single order hours apart, which statement is correct?

Exhibit 1 for question 64
  • ADuplicate records enqueued more than 2 hours apart may be retained and the orders table may contain duplicate records with the same customer_id and order_id. (correct answer)
  • BAll records will be held in the state store for 2 hours before being deduplicated and committed to the orders table.
  • CThe orders table will contain only the most recent 2 hours of records and no duplicates will be present.
  • DThe orders table will not contain duplicates, but records arriving more than 2 hours late will be ignored and missing from the table.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Duplicate records enqueued more than 2 hours apart may be retained and the orders table may contain duplicate records with the same customer_id and order_id.

Topic 1 Β· Question 65

A data engineer is configuring a pipeline that will potentially see late-arriving, duplicate records. In addition to de-duplicating records within the batch, which of the following approaches allows the data engineer to deduplicate data against previously processed records as it is inserted into a Delta table?

  • ARely on Delta Lake schema enforcement to prevent duplicate records.
  • BVACUUM the Delta table after each batch completes.
  • CPerform an insert-only merge with a matching condition on a unique key. (correct answer)
  • DPerform a full outer join on a unique key and overwrite existing data.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Perform an insert-only merge with a matching condition on a unique key.

Topic 1 Β· Question 66

A junior data engineer seeks to leverage Delta Lake's Change Data Feed functionality to create a Type 1 table representing all of the values that have ever been valid for all rows in a bronze table created with the property delta.enableChangeDataFeed = true. They plan to execute the following code as a daily job: Which statement describes the execution and results of running the above query multiple times?

Exhibit 1 for question 66
  • AEach time the job is executed, newly updated records will be merged into the target table, overwriting previous values with the same primary keys.
  • BEach time the job is executed, the entire available history of inserted or updated records will be appended to the target table, resulting in many duplicate entries. (correct answer)
  • CEach time the job is executed, only those records that have been inserted or updated since the last execution will be appended to the target table, giving the desired result.
  • DEach time the job is executed, the differences between the original and current versions are calculated; this may result in duplicate entries for some records.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Each time the job is executed, the entire available history of inserted or updated records will be appended to the target table, resulting in many duplicate entries.

Topic 1 Β· Question 67

A DLT pipeline includes the following streaming tables: β€’ raw_iot ingests raw device measurement data from a heart rate tracking device. β€’ bpm_stats incrementally computes user statistics based on BPM measurements from raw_iot. How can the data engineer configure this pipeline to be able to retain manually deleted or updated records in the raw_iot table, while recomputing the downstream table bpm_stats table when a pipeline update is run?

  • ASet the pipelines.reset.allowed property to false on raw_iot (correct answer)
  • BSet the skipChangeCommits flag to true on raw_iot
  • CSet the pipelines.reset.allowed property to false on bpm_stats
  • DSet the skipChangeCommits flag to true on bpm_stats
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Set the pipelines.reset.allowed property to false on raw_iot This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 68

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?

  • ANew fields will not be computed for historic records. (correct answer)
  • BSpark cannot capture the topic and partition fields from a Kafka source.
  • CUpdating the table schema requires a default value provided for each field added.
  • DUpdating the table schema will invalidate the Delta transaction log metadata.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: New fields will not be computed for historic records. This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 69

A nightly job ingests data into a Delta Lake table using the following code: The next step in the pipeline requires a function that returns an object that can be used to manipulate new records that have not yet been processed to the next table in the pipeline. Which code snippet completes this function definition? def new_records():

Exhibit 1 for question 69
  • Areturn spark.readStream.table("bronze") (correct answer)
  • Breturn spark.read.option("readChangeFeed", "true").table ("bronze")
  • C
  • D
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: return spark.readStream.table("bronze")

Explanation

The bronze layer preserves raw ingested data for replay, auditing, and downstream refinement.

Topic 1 Β· Question 70

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?

  • AThe 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.
  • BBecause Delta Lake uses Parquet for data storage, data types can be easily evolved by just modifying file footer information in place.
  • CSchema inference and evolution on Databricks ensure that inferred types will always accurately match the data types used by downstream systems.
  • DBecause Databricks will infer schema using types that allow all observed data to be processed, setting types manually provides greater assurance of data quality enforcement. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option 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.

Topic 1 Β· Question 71

The data engineering team maintains the following code: Assuming that this code produces logically correct results and the data in the source tables has been de-duplicated and validated, which statement describes what will occur when this code is executed?

Exhibit 1 for question 71
  • AA batch job will update the enriched_itemized_orders_by_account table, replacing only those rows that have different values than the current version of the table, using accountID as the primary key.
  • BThe enriched_itemized_orders_by_account table will be overwritten using the current valid version of data in each of the three tables referenced in the join logic. (correct answer)
  • CNo computation will occur until enriched_itemized_orders_by_account is queried; upon query materialization, results will be calculated using the current valid version of data in each of the three tables referenced in the join logic.
  • DAn incremental job will detect if new rows have been written to any of the source tables; if new rows are detected, all results will be recalculated and used to overwrite the enriched_itemized_orders_by_account table.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: The enriched_itemized_orders_by_account table will be overwritten using the current valid version of data in each of the three tables referenced in the join logic.

Topic 1 Β· Question 72

The data engineering team is configuring environments for development, testing, and production before beginning migration on a new data pipeline. The team requires extensive testing on both the code and data resulting from code execution, and the team wants to develop and test against data as similar to production data as possible. A junior data engineer suggests that production data can be mounted to the development and testing environments, allowing pre-production code to execute against production data. Because all users have admin privileges in the development environment, the junior data engineer has offered to configure permissions and mount this data for the team. Which statement captures best practices for this situation?

  • AAll development, testing, and production code and data should exist in a single, unified workspace; creating separate environments for testing and development complicates administrative overhead.
  • BIn environments where interactive code will be executed, production data should only be accessible with read permissions; creating isolated databases for each environment further reduces risks. (correct answer)
  • CBecause access to production data will always be verified using passthrough credentials, it is safe to mount data to any Databricks development environment.
  • DBecause Delta Lake versions all data and supports time travel, it is not possible for user error or malicious actors to permanently delete production data; as such, it is generally safe to mount production data anywhere.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: In environments where interactive code will be executed, production data should only be accessible with read permissions; creating isolated databases for each environment further reduces risks.

Topic 1 Β· Question 73

The data architect has mandated that all tables in the Lakehouse should be configured as external Delta Lake tables. Which approach will ensure that this requirement is met?

  • AWhenever a database is being created, make sure that the LOCATION keyword is used.
  • BWhen the workspace is being configured, make sure that external cloud object storage has been mounted.
  • CWhenever a table is being created, make sure that the LOCATION keyword is used. (correct answer)
  • DWhen tables are created, make sure that the UNMANAGED keyword is used in the CREATE TABLE statement.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Whenever a table is being created, make sure that the LOCATION keyword is used.

Topic 1 Β· Question 74

The marketing team is looking to share data in an aggregate table with the sales organization, but the field names used by the teams do not match, and a number of marketing-specific fields have not been approved for the sales org. Which of the following solutions addresses the situation while emphasizing simplicity?

  • ACreate a view on the marketing table selecting only those fields approved for the sales team; alias the names of any fields that should be standardized to the sales naming conventions. (correct answer)
  • BCreate a new table with the required schema and use Delta Lake's DEEP CLONE functionality to sync up changes committed to one table to the corresponding table.
  • CUse a CTAS statement to create a derivative table from the marketing table; configure a production job to propagate changes.
  • DAdd a parallel table write to the current production pipeline, updating a new sales table that varies as required from the marketing table.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Create a view on the marketing table selecting only those fields approved for the sales team; alias the names of any fields that should be standardized to the sales naming conventions.

Topic 1 Β· Question 75

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 scan the parquet file footers to identify each row that meets 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)
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 76

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 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 77

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 77
  • AThe write will insert all records except those that violate the table constraints; the violating records will be reported in a warning log.
  • 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.
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 78

A junior data engineer is migrating a workload from a relational database system to the Databricks Lakehouse. The source system uses a star schema, leveraging foreign key constraints and multi-table inserts to validate records on write. Which consideration will impact the decisions made by the engineer while migrating this workload?

  • ADatabricks only allows foreign key constraints on hashed identifiers, which avoid collisions in highly-parallel writes.
  • BForeign keys must reference a primary key field; multi-table inserts must leverage Delta Lake’s upsert functionality.
  • CCommitting to multiple tables simultaneously requires taking out multiple table locks and can lead to a state of deadlock.
  • DAll Delta Lake transactions are ACID compliant against a single table, and Databricks does not enforce foreign key constraints. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: All Delta Lake transactions are ACID compliant against a single table, and Databricks does not enforce foreign key constraints.

Explanation

Delta Lake adds ACID transactions, schema enforcement, time travel, and reliable batch and streaming operations to a data lake.

Topic 1 Β· Question 79

A data architect has heard about Delta Lake’s built-in versioning and time travel capabilities. For auditing purposes, they have a requirement to maintain a full record of all valid street addresses as they appear in the customers table. The architect is interested in implementing a Type 1 table, overwriting existing records with new values and relying on Delta Lake time travel to support long-term auditing. A data engineer on the project feels that a Type 2 table will provide better performance and scalability. Which piece of information is critical to this decision?

  • AData corruption can occur if a query fails in a partially completed state because Type 2 tables require setting multiple fields in a single update.
  • BShallow clones can be combined with Type 1 tables to accelerate historic queries for long-term versioning.
  • CDelta Lake time travel cannot be used to query previous versions of these tables because Type 1 changes modify data files in place.
  • DDelta Lake time travel does not scale well in cost or latency to provide a long-term versioning solution. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Delta Lake time travel does not scale well in cost or latency to provide a long-term versioning solution.

Explanation

Delta Lake adds ACID transactions, schema enforcement, time travel, and reliable batch and streaming operations to a data lake. Delta time travel queries or restores earlier table versions using transaction-log history. This option scales automatically to match demand.

Topic 1 Β· Question 80

A data engineer wants to join a stream of advertisement impressions (when an ad was shown) with another stream of user clicks on advertisements to correlate when impressions led to monetizable clicks. In the code below, Impressions is a streaming DataFrame with a watermark ("event_time", "10 minutes") The data engineer notices the query slowing down significantly. Which solution would improve the performance?

Exhibit 1 for question 80
  • AJoining on event time constraint: clickTime >= impressionTime AND clickTime <= impressionTime interval 1 hour (correct answer)
  • BJoining on event time constraint: clickTime + 3 hours < impressionTime - 2 hours
  • CJoining on event time constraint: clickTime == impressionTime using a leftOuter join
  • DJoining on event time constraint: clickTime >= impressionTime - interval 3 hours and removing watermarks
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Joining on event time constraint: clickTime >= impressionTime AND clickTime <= impressionTime interval 1 hour This option meets the real-time / low-latency performance requirement.

Showing questions 61–80 of 110 Β· Page 4 of 6