Databricks Certified Data Engineer Professional Exam Databricks-Certified-Professional-Data-Engineer Question # 38 Topic 4 Discussion

Databricks Certified Data Engineer Professional Exam Databricks-Certified-Professional-Data-Engineer Question # 38 Topic 4 Discussion

Databricks-Certified-Professional-Data-Engineer Exam Topic 4 Question 38 Discussion:
Question #: 38
Topic #: 4

The view updates represents an incremental batch of all newly ingested data to be inserted or updated in the customers table.

The following logic is used to process these records.

MERGE INTO customers

USING (

SELECT updates.customer_id as merge_ey, updates .*

FROM updates

UNION ALL

SELECT NULL as merge_key, updates .*

FROM updates JOIN customers

ON updates.customer_id = customers.customer_id

WHERE customers.current = true AND updates.address <> customers.address

) staged_updates

ON customers.customer_id = mergekey

WHEN MATCHED AND customers. current = true AND customers.address <> staged_updates.address THEN

UPDATE SET current = false, end_date = staged_updates.effective_date

WHEN NOT MATCHED THEN

INSERT (customer_id, address, current, effective_date, end_date)

VALUES (staged_updates.customer_id, staged_updates.address, true, staged_updates.effective_date, null)

Which statement describes this implementation?

    The customers table is implemented as a Type 2 table; old values are overwritten and new customers are appended.


A.

The customers table is implemented as a Type 1 table; old values are overwritten by new values and no history is maintained.


B.

The customers table is implemented as a Type 2 table; old values are maintained but marked as no longer current and new values are inserted.


C.

The customers table is implemented as a Type 0 table; all writes are append only with no changes to existing values.


Get Premium Databricks-Certified-Professional-Data-Engineer Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.