
Answer-first summary for fast verification
Answer: Apply CHECK constraints to the Delta Lake table to ensure transaction amounts are positive.
Option B is correct because Delta Lake supports CHECK constraints directly, which can be used to enforce specific data quality rules at the time of data insertion, ensuring that transaction amounts are positive.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Consider a scenario where you need to implement a Delta Lake table to store transaction data. The table should enforce data quality rules such as ensuring that transaction amounts are positive. How would you add constraints to the Delta Lake table to achieve this?
A
Use primary keys and foreign keys to enforce data quality rules.
B
Apply CHECK constraints to the Delta Lake table to ensure transaction amounts are positive.
C
Implement a pre-processing step to filter out invalid transaction amounts before insertion.
D
Use a combination of primary keys and CHECK constraints.
No comments yet.