Which statement describes this implementation?
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.
Which statement describes this implementation?
A . The customers table is implemented as a Type 3 table; old values are maintained as a new column alongside the current value.
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.
D . The customers table is implemented as a Type 1 table; old values are overwritten by new values and no history is maintained.
E . The customers table is implemented as a Type 2 table; old values are overwritten and new customers are appended.
Answer: A
Explanation:
The logic uses the MERGE INTO command to merge new records from the view updates into the table customers. The MERGE INTO command takes two arguments: a target table and a source table or view. The command also specifies a condition to match records between the target and the source, and a set of actions to perform when there is a match or not. In this case, the condition is to match records by customer_id, which is the primary key of the customers table. The actions are to update the existing record in the target with the new values from the source, and set the current_flag to false to indicate that the record is no longer current; and to insert a new record in the target with the new values from the source, and set the current_flag to true to indicate that the record is current. This means that old values are maintained but marked as no longer current and new values are inserted, which is the definition of a Type 2 table.
Verified Reference: [Databricks Certified Data Engineer Professional], under “Delta Lake” section; Databricks Documentation, under “Merge Into (Delta Lake on Databricks)” section.
Latest Databricks Certified Professional Data Engineer Dumps Valid Version with 222 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund