
Answer-first summary for fast verification
Answer: Define a temporary table that performs a left outer join on validation_copy and report, and define an expectation that no report key values are null
To validate that the report table contains all records from validation_copy using DLT expectations, the correct approach involves checking for missing entries. Option A suggests creating a temporary table via a left outer join between validation_copy and report. This temporary table captures any records in validation_copy not present in the report (indicated by NULL in the report's key). By setting an expectation that no report key values are NULL in this temporary table, we ensure all validation_copy records exist in the report. This approach leverages DLT's ability to define expectations on derived datasets (like the temporary table) to validate cross-table integrity. Other options either use UDFs/views in ways not supported by DLT's expectation syntax or fail to properly reference the necessary data.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Which method enables the use of DLT expectations to verify that a derived table report includes all records from the source table validation_copy?
A
Define a temporary table that performs a left outer join on validation_copy and report, and define an expectation that no report key values are null
B
Define a SQL UDF that performs a left outer join on two tables, and check if this returns null values for report key values in a DLT expectation for the report table
C
Define a view that performs a left outer join on validation_copy and report, and reference this view in DLT expectations for the report table
D
Define a function that performs a left outer join on validation_copy and report, and check against the result in a DLT expectation for the report table
No comments yet.