Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Question 48 of 119
Free Preview · 119 of 395 · questions 1–119 of 395 are free. Sign up free to sync your progress across devices.
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
Since is using SDC Type 1 so the this will not keep the historical change. Option C is more makesense.
Correct: C - We process only tens of thousands of new records instead of scanning millions of historical records. Using the max 'last_login' per user ensures merging only the most recent state for each user from that batch. The MERGE satement efficiently handles both updates and inserts (SCD Type 1). Incorrect: A - The 'account_history' is a table, not a file directory. Auto Loader subscribes to file directories in object storage, not Delta Tables. B - Overwritting the entire table by scanning all of 'account_history' records every hour is extremely inefficient when processing millions of records to update only tens of thousands. D - Using Delta version history adds unnecessary complexity and overhead compared to direct timestamp filtering. E - Username may not be unique across users. The 'user_id' is defind as the primary key in the schema.
Many people who are fixated on the "overwrite" in option B have overlooked the fact, that the overwrite is happening by querying the history table, grouping on user_id and then filtering (probably a having clause) the records on the max(last_updated). What do you think will happen to the other records which have not been updated in the last hour?. they will get overwritten and this will lead to missing records. Option C is the best option here.