QuestionQ140
VerifiedData ModellingAn hourly batch job is set up to ingest data files from a cloud object-storage container, where every batch represents all records generated by the source system during a given hour. The job that processes these records into the Lakehouse is delayed sufficiently so that no late-arriving data is missed.
The user_id field is a unique key for the data, with the following schema:
user_id BIGINT, username STRING, user_utc STRING, user_region STRING, last_login BIGINT, auto_pay BOOLEAN, last_updated BIGINT
All new records are ingested into a table named account_history, which retains a complete record of all data using the same schema as the source. The next table in the system is named account_current and is implemented as a Type 1 table that represents the latest value for every unique user_id.
Assuming there are millions of user accounts and tens of thousands of records processed each hour, which implementation can efficiently update the described account_current table as part of every hourly batch job?
Community Discussion