CERTIFIED-DATA-ENGINEER-PROFESSIONAL · Question #91
A user wants to use DLT expectations to validate that a derived table report contains all records from the source, included in the table validation_copy. The user attempts and fails to accomplish…
The correct answer is D. Define a view that performs a left outer join on validation_copy and report, and reference this view. To validate that all records from the source are included in the derived table, creating a view that performs a left outer join between the validation_copy table and the report table is effective. The view can highlight any discrepancies, such as null values in the report…
Question
A user wants to use DLT expectations to validate that a derived table report contains all records from the source, included in the table validation_copy. The user attempts and fails to accomplish this by adding an expectation to the report table definition. Which approach would allow using DLT expectations to validate all expected records are present in this table?
Options
- ADefine a SQL UDF that performs a left outer join on two tables, and check if this returns null
- BDefine a function that performs a left outer join on validation_copy and report and report, and
- CDefine a temporary table that perform a left outer join on validation_copy and report, and define
- DDefine a view that performs a left outer join on validation_copy and report, and reference this view
How the community answered
(26 responses)- A4% (1)
- B12% (3)
- C8% (2)
- D77% (20)
Explanation
To validate that all records from the source are included in the derived table, creating a view that performs a left outer join between the validation_copy table and the report table is effective. The view can highlight any discrepancies, such as null values in the report table's key columns, indicating missing records. This view can then be referenced in DLT (Delta Live Tables) expectations for the report table to ensure data integrity. This approach allows for a comprehensive comparison between the source and the derived table.
Topics
Community Discussion
No community discussion yet for this question.