Q: 3
Which of the following code blocks will remove the rows where the value in column age is greater
than 25 from the existing Delta table my_table and save the updated table?
Options
Discussion
Gotta be C for this, but honestly not 100 percent since E sometimes trips me up.
Yeah makes sense, C is the actual delete in Delta Lake so that's what I'd pick.
C tbh, only option that removes those rows. Delta SQL needs the DELETE statement for this not UPDATE.
I don’t think it’s B. Option B would just try to update rows, not actually remove them. Looks like a trap since the action should be a DELETE not UPDATE here.
C
Seen this style in other practice sets, it's C for Delta tables.
Option C for me. DELETE is what you use to actually remove rows that meet a condition. Not totally sure if there’s a subtlety I’m missing but pretty confident in this one.
I don't think B is right. UPDATE can't actually remove rows, it's just for changing values within existing ones. Pretty sure C is correct here since DELETE is specifically used to eliminate rows matching the condition. Easy trap with those update options!
C
Kinda think B makes sense too since UPDATE could set a status or flag to mark those rows, basically a soft delete. Unless the question strictly wants physical removal, I'd expect UPDATE works in some orgs. Someone else interpret it differently?
Be respectful. No spam.