exam questions

Exam Certified Data Engineer Associate All Questions

View all questions & answers for the Certified Data Engineer Associate exam

Exam Certified Data Engineer Associate topic 1 question 144 discussion

Actual exam question from Databricks's Certified Data Engineer Associate
Question #: 144
Topic #: 1
[All Certified Data Engineer Associate Questions]

Identify the impact of ON VIOLATION DROP ROW and ON VIOLATION FAIL UPDATE for a constraint violation.

A data engineer has created an ETL pipeline using Delta Live table to manage their company travel reimbursement detail, they want to ensure that the if the location details has not been provided by the employee, the pipeline needs to be terminated.

How can the scenario be implemented?

  • A. CONSTRAINT valid_location EXPECT (location = NULL)
  • B. CONSTRAINT valid_location EXPECT (location != NULL) ON VIOLATION FAIL UPDATE
  • C. CONSTRAINT valid_location EXPECT (location != NULL) ON DROP ROW
  • D. CONSTRAINT valid_location EXPECT (location != NULL) ON VIOLATION FAIL
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
san089
1 month, 2 weeks ago
Selected Answer: B
Correct Answer: B From Databricks doc CONSTRAINT valid_count EXPECT (count > 0) ON VIOLATION FAIL UPDATE
upvoted 1 times
...
MultiCloudIronMan
1 month, 3 weeks ago
Selected Answer: D
The correct answer is D. CONSTRAINT valid_location EXPECT (location != NULL) ON VIOLATION FAIL. This constraint ensures that if the location details are not provided by the employee (i.e., location is null), the pipeline will be terminated.
upvoted 1 times
...
canada_2k1
2 months ago
Selected Answer: B
The answer from Udemy course
upvoted 1 times
...
knightkkd
2 months ago
Selected Answer: B
FAIL UPDATE: Immediately stop pipeline execution. https://learn.microsoft.com/en-us/azure/databricks/delta-live-tables/expectations#fail
upvoted 1 times
...
Worldmaster
2 months ago
Selected Answer: B
B is correct https://docs.databricks.com/en/delta-live-tables/sql-ref.html ON VIOLATION Optional action to take for failed rows: FAIL UPDATE: Immediately stop pipeline execution. DROP ROW: Drop the record and continue processing.
upvoted 1 times
...
rsmf
3 months ago
Selected Answer: D
D is correct
upvoted 1 times
CaoMengde09
1 month, 1 week ago
There is no such a thing as ON VIOLATION FAIL. We have only 3 behaviour to trigger when a constraint is being violated, and they fall under those syntaxes : --> ON VIOLATION FAIL UPDATE : The pipeline fails once it detects the first violation --> ON VIOLATION DROP ROW : The pipeline won't fail but the failing rows will be flagged and stored in event log --> If you put nothing after the expectation : The rows that violates the expectation will be loaded to the sink (Since Databricks doesn't enforce classical database constraints) and the rows will be flagged in the event log. B is the best answer, if you're not convinced try to run D in a notebook and you'll get a syntax error
upvoted 1 times
...
...
comoon
3 months, 1 week ago
D is correct
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago