
Answer-first summary for fast verification
Answer: The total count of records is calculated from the Delta transaction logs
Delta Lake maintains transaction logs (Delta Log) that record all changes to a table, including metadata such as the number of rows in each data file. When a `COUNT(*)` query is executed, Delta Lake efficiently retrieves the total row count by aggregating the row counts from the transaction logs instead of scanning all data files or Parquet metadata. This approach avoids the overhead of reading every file and ensures fast query performance. Options A and D involve scanning data files or Parquet metadata, which are not required. Option B is incorrect because the query does not rely on cached results by default unless explicitly configured, which is not mentioned in the scenario.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
How are results generated each time a Databricks SQL dashboard updates when it's configured to monitor the total record count in a set of Delta Lake tables using the following query pattern?
SELECT COUNT(*) FROM table_name
SELECT COUNT(*) FROM table_name
A
The total count of rows is calculated by scanning all data files
B
The total count of rows will be returned from cached results unless REFRESH is run
C
The total count of records is calculated from the Delta transaction logs
D
The total count of records is calculated from the parquet file metadata