Free Databricks Certified Data Engineer Associate Actual Exam Questions - Question 5 Discussion
than 25 from the existing Delta table my_table and save the updated table?
D imo, UPDATE won’t delete rows, just change their values, so B and D can be dropped. A is just a SELECT, no deletion happens. Between C and E, E deletes rows where age <= 25, which is opposite of what we want. So C is the only option that directly removes rows where age > 25. The syntax looks standard for DELETE in SQL-based systems like Delta Lake, so it should work here to update the table as asked.
C/E? C deletes rows where age > 25, which matches the requirement. E deletes the opposite set (age <= 25), so it’s not right. Also, UPDATE statements (B and D) won’t remove rows, just modify them. A is just selecting data, no deletion. So between C and E, only C fits the need to remove rows with age over 25.
I’d rule out A and B since SELECT and UPDATE without SET don’t delete rows. C looks clean for deleting rows with age > 25, so going with C here.
Maybe C, DELETE is the only option that actually removes rows matching the condition.
C imo, DELETE is the standard way to remove rows matching a condition. Options B and D are about updating values, not deleting rows, so they don’t fit the goal here.
C imo, DELETE makes the most sense for removing rows based on a condition. UPDATE usually modifies values, not deletes rows. Options A and B don’t fit the delete action needed here.
Is the Delta table version or transaction log relevant here? Also, does the question imply updating the table in-place or creating a new version? That could affect whether DELETE or UPDATE is the right choice.