Skip to content
RED SAGSkills

Data Warehousing interview questions and answers

Data warehousing questions cover how analytics data is loaded, modelled and queried at scale.

Below are 60 Data Warehousing questions with the correct answer and a short explanation, grouped from fresher to experienced level. Try each one before you open the answer.

What Data Warehousing interviews usually check

  • ✓ETL vs ELT
  • ✓Dimensional modelling
  • ✓Partitioning and clustering
  • ✓Incremental loads
  • ✓Cost and query performance

Data Warehousing interview questions for freshers easy

1. Data lake vs warehouse

Which statement best describes a data lake compared with a data warehouse?

  1. A.A lake only holds structured tables
  2. B.A lake is always faster for SQL
  3. C.A lake cannot store files
  4. D.A lake stores raw files of any type cheaply in object storage, while a warehouse stores modelled, structured data optimised for SQL
Show answer

Answer: D. A lake stores raw files of any type cheaply in object storage, while a warehouse stores modelled, structured data optimised for SQL

Data lakes keep raw and semi-structured data such as JSON, logs and images on cheap object storage like S3 or GCS. Warehouses manage structured tables with strong SQL performance. Lakehouse table formats add warehouse features like ACID transactions on top of lake storage.

2. Schema on read versus schema on write

What does "schema on read" mean, as used in data lakes?

  1. A.Structure is applied when data is queried, not when stored
  2. B.Every file must match a schema before it lands
  3. C.The schema is printed on each report
  4. D.Only read-only users can see the schema
Show answer

Answer: A. Structure is applied when data is queried, not when stored

In schema on write, as in a relational database, data must fit the table when it is inserted. In schema on read, raw files land as they are and the structure is applied by the query. It is flexible, but bad data is found later, at query time.

3. OLTP and OLAP workloads

An e-commerce app's Postgres database handles orders as they are placed. Analysts want to run yearly sales reports over 500 million rows. Why is a separate warehouse usually used for the reports?

  1. A.Warehouses suit big scans; app databases suit small writes
  2. B.Postgres cannot store more than 10 million rows in one table
  3. C.Reports need data in JSON, which Postgres cannot store
  4. D.A warehouse makes app writes faster by caching them
Show answer

Answer: A. Warehouses suit big scans; app databases suit small writes

OLTP systems are tuned for many short reads and writes on single rows with strict consistency. OLAP warehouses are tuned for scanning and aggregating huge numbers of rows across a few columns. Running heavy reports on the app database also competes with live traffic.

4. Why warehouses store columns

A table has 80 columns. A query sums revenue grouped by region. Why does columnar storage make this fast?

  1. A.It keeps every row in memory at all times
  2. B.It reads only the two columns the query uses
  3. C.It stores rows sorted by primary key
  4. D.It skips the GROUP BY step entirely
Show answer

Answer: B. It reads only the two columns the query uses

Columnar storage keeps each column's values together, so a query reads only the columns it uses: 2 of 80 here. Values in one column are also similar, so they compress well. Row stores must read whole rows, including the 78 unused columns.

5. Facts and dimensions

In a star schema for retail sales, which of these belongs in a dimension table rather than the fact table?

  1. A.Quantity sold
  2. B.Sale amount in ₹
  3. C.Product category
  4. D.Discount amount
Show answer

Answer: C. Product category

Fact tables hold measurable events and numbers, like quantity and amount, plus keys to dimensions. Dimension tables hold descriptive context used to filter and group, such as product name and category. Queries join the fact to dimensions and aggregate the measures.

6. Star versus snowflake schema

In a snowflake schema, how do dimensions differ from a star schema?

  1. A.Dimensions are normalised into several related tables
  2. B.There are no dimension tables at all
  3. C.Facts are stored inside dimension tables
  4. D.Every dimension must use Snowflake the product
Show answer

Answer: A. Dimensions are normalised into several related tables

A snowflake schema splits dimensions into sub-tables, for example product, then category, then department. That saves a little storage but needs more joins. Star schemas keep each dimension flat, which is simpler and usually faster for analysts.

7. Slowly changing dimension type 1

A customer moves from Pune to Bengaluru. The customer dimension is SCD type 1. What happens to the row?

  1. A.A new row is added and the old one is closed
  2. B.The city is overwritten, so history is lost
  3. C.A column previous_city is added
  4. D.The row is deleted
Show answer

Answer: B. The city is overwritten, so history is lost

Type 1 simply overwrites the old value. Past sales now show Bengaluru too, because the dimension no longer knows about Pune. It suits corrections like spelling fixes, where history does not matter.

8. Snowflake storage and compute

In Snowflake, the finance team and the data science team run heavy queries on the same tables at the same time without slowing each other. What makes this possible?

  1. A.Each team uses its own virtual warehouse on shared storage
  2. B.Each team gets its own copy of the tables
  3. C.Snowflake runs queries one at a time
  4. D.Snowflake caches all tables in each user's browser
Show answer

Answer: A. Each team uses its own virtual warehouse on shared storage

Snowflake keeps data once in central storage and runs queries on virtual warehouses, which are separate compute clusters. Each team can have its own warehouse, sized and billed separately, all reading the same data. That avoids both copies and resource fights.

9. Loading files as they land

Files arrive in an S3 bucket every few minutes, and you want them loaded into Snowflake automatically within a minute or two. What is the usual tool?

  1. A.A nightly COPY job
  2. B.A zero-copy clone
  3. C.A materialized view
  4. D.Snowpipe
Show answer

Answer: D. Snowpipe

Snowpipe loads files continuously using serverless compute, usually triggered by cloud storage events. It keeps load history so the same file is not loaded twice. For lower latency from apps or Kafka, Snowpipe Streaming writes rows directly.

10. A measure you can always sum

Which measure in a daily sales fact table can be summed across every dimension, including time, and still give a meaningful total?

  1. A.Stock on hand at the end of each day
  2. B.Units sold
  3. C.Unit price of the product
  4. D.Profit margin percentage
Show answer

Answer: B. Units sold

Units sold is fully additive: adding it across stores, products or days always gives a true total. Stock on hand is semi-additive, since summing it over days double counts. Unit price and margin percentage are non-additive and must be averaged or recomputed from their parts.

11. View or table materialization

A dbt model is a heavy aggregation over 2 billion rows, and dashboards query it 500 times a day. Which materialization is the better default?

  1. A.table, so the result is built once per run
  2. B.view, so it is always computed on read
  3. C.ephemeral, so it is inlined
  4. D.seed, so it is loaded from CSV
Show answer

Answer: A. table, so the result is built once per run

A view stores only SQL, so each of the 500 queries reruns the heavy aggregation. A table stores the result, built once per dbt run, and dashboards read it cheaply. Views are fine for light models where freshness matters more than cost.

12. Where dbt keeps connection details

Where does dbt Core read warehouse connection details such as account, user and warehouse for each target?

  1. A.From each model's SQL file
  2. B.From profiles.yml
  3. C.From the seeds folder
  4. D.From schema.yml
Show answer

Answer: B. From profiles.yml

profiles.yml defines connection profiles and targets like dev and prod. It usually lives in ~/.dbt or uses env_var() for secrets, so credentials stay out of git. dbt_project.yml names which profile to use.

13. What the _delta_log folder is

A Delta Lake table's folder contains Parquet files and a _delta_log folder. What is _delta_log?

  1. A.A backup copy of every Parquet data file
  2. B.Error logs written by the Spark jobs
  3. C.An ordered log of commits that define each version
  4. D.A cache of query results
Show answer

Answer: C. An ordered log of commits that define each version

The transaction log records each commit as a JSON file that adds or removes data files, with periodic checkpoints. Readers use it to know exactly which files belong to the current or any past version. That gives ACID commits on top of plain object storage.

14. Row format or column format

Kafka events are written one at a time and later scanned by analysts for a few columns. Which format pairing is typical?

  1. A.Avro for events, Parquet for analytics
  2. B.Parquet for events, CSV for analytics
  3. C.CSV everywhere
  4. D.Excel for events, Avro for analytics
Show answer

Answer: A. Avro for events, Parquet for analytics

Avro is row-oriented and good for writing records one by one with an evolving schema, which suits messaging. Parquet is columnar and suits large analytic scans of a few columns. Pipelines often land Avro events and convert them to Parquet tables.

15. One copy, many engines

A company keeps its tables in Apache Iceberg on S3. What is the main benefit of an open table format here?

  1. A.Only one query engine may ever read the data
  2. B.Many engines can share one copy of the tables
  3. C.Data no longer needs to be stored in files
  4. D.It removes the need for any access control
Show answer

Answer: B. Many engines can share one copy of the tables

Open table formats define table metadata in an open spec, so Spark, Trino, Flink, Snowflake, BigQuery and others can work on one copy of the data. Teams avoid lock-in and duplicate pipelines. Access control is still needed, often through the catalog.

16. Exploring Parquet on a laptop

An analyst has a 4 GB folder of Parquet files and wants fast SQL on a laptop, without a cluster. Which tool fits well?

  1. A.A Kafka cluster
  2. B.DuckDB
  3. C.Microsoft Word
  4. D.A Redshift cluster
Show answer

Answer: B. DuckDB

DuckDB is an embedded analytical database that runs SQL directly on Parquet and CSV files with a columnar, vectorised engine. It handles many gigabytes on one machine. It is popular for local exploration, tests and small pipelines.

17. Folders named dt=2026-10-01

Parquet files are stored in folders like s3://lake/events/dt=2026-10-01/. A query filters WHERE dt = '2026-10-01'. What does the engine do?

  1. A.Reads every folder and filters rows after
  2. B.Fails, because folder names cannot be columns
  3. C.Reads only the matching folder, by partition pruning
  4. D.Reads only the first file in each folder
Show answer

Answer: C. Reads only the matching folder, by partition pruning

Hive-style partitioning encodes partition values in folder names, and engines turn them into a column. A filter on that column lets the engine skip every other folder. The filter must be on the partition column itself, not a function of another column.

18. Schema-on-read and schema-on-write

A raw data lake stores JSON files and applies a schema only when a query reads them. A warehouse table rejects rows that do not match its columns. What are these approaches called?

  1. A.Both are schema-on-write
  2. B.The lake is schema-on-read; the warehouse is schema-on-write
  3. C.The lake is schema-on-write; the warehouse is schema-on-read
  4. D.Both are schema-less
Show answer

Answer: B. The lake is schema-on-read; the warehouse is schema-on-write

Schema-on-read stores data as it comes and interprets it at query time, which is flexible but pushes errors to readers. Schema-on-write validates data on load, which is stricter and gives reliable tables. Lakehouse formats add schema-on-write rules to lake storage.

19. Sending warehouse data back to the CRM

Sales reps want each lead's predicted score, computed in the warehouse, to appear inside the CRM they use every day. What is this pattern called?

  1. A.Reverse ETL
  2. B.Change data capture
  3. C.Log compaction
  4. D.Schema-on-read
Show answer

Answer: A. Reverse ETL

Reverse ETL syncs modelled data from the warehouse into operational tools such as a CRM, ad platform or support desk. The warehouse stays the single place where metrics are computed, and business teams see them where they work. Tools like Hightouch or Census do this.

20. What Delta Lake adds to Parquet

Delta Lake tables store data as Parquet files. What does Delta add on top?

  1. A.A transaction log that gives ACID commits
  2. B.A new compressed file format replacing Parquet
  3. C.An always-on server that holds the data
  4. D.Automatic replication across three regions
Show answer

Answer: A. A transaction log that gives ACID commits

Delta keeps a _delta_log folder of JSON commits and checkpoints that list which Parquet files make up each version. Readers see only committed versions, so a failed job leaves no half-written data. This also enables MERGE, time travel and schema enforcement.

Data Warehousing intermediate interview questions medium

21. Undoing a bad load

A job wrote wrong values into a Delta Lake table an hour ago. What is the quickest way to recover?

  1. A.Rebuild the table from the original source for the last five years
  2. B.Use time travel to query or RESTORE the table to the version before the bad write
  3. C.Delete the _delta_log folder
  4. D.Run OPTIMIZE on the table
Show answer

Answer: B. Use time travel to query or RESTORE the table to the version before the bad write

Delta, Iceberg and Hudi keep a log of table versions, so you can read an older snapshot with VERSION AS OF or TIMESTAMP AS OF, and Delta can RESTORE to it. This works as long as the old data files have not been removed by VACUUM. Deleting the log would corrupt the table.

22. LIMIT and BigQuery cost

In BigQuery on-demand pricing, a colleague runs SELECT * FROM events LIMIT 10 on a 5 TB non-clustered table to preview it. Roughly how much data is billed?

  1. A.Only the 10 rows returned
  2. B.Nothing, previews are always free
  3. C.About 1 MB
  4. D.All columns of the whole table, about 5 TB
Show answer

Answer: D. All columns of the whole table, about 5 TB

BigQuery bills on bytes scanned in the columns referenced, and LIMIT does not reduce the scan on a non-clustered table. Selecting only needed columns and filtering on partition or cluster columns cuts cost. The table preview tab in the console is free for looking at sample rows.

23. Idle Snowflake warehouse cost

A Snowflake virtual warehouse used only by a nightly job keeps running all day and burns credits. Which setting addresses this directly?

  1. A.AUTO_SUSPEND with a short idle timeout, plus AUTO_RESUME so it starts again when a query arrives
  2. B.Increase the warehouse size to 4X-Large
  3. C.Turn on time travel for 90 days
  4. D.Add more clustering keys
Show answer

Answer: A. AUTO_SUSPEND with a short idle timeout, plus AUTO_RESUME so it starts again when a query arrives

Snowflake bills compute per second while a warehouse is running, with a one-minute minimum each time it starts. Auto-suspend stops it after a period of inactivity and auto-resume restarts it when needed. Resource monitors can also cap credit usage.

24. A schema change that breaks no one

Several dashboards and jobs read the customers table. Which change is safest for them?

  1. A.Adding a new nullable column
  2. B.Renaming the email column
  3. C.Changing customer_id from INT to TEXT
  4. D.Dropping the phone column
Show answer

Answer: A. Adding a new nullable column

Adding an optional column is backward compatible: existing queries keep working and ignore it. Renames, drops and type changes break readers that use the old name or type. For those, add the new column first, migrate readers, then remove the old one.

25. Queries slow on a streaming table

A streaming job writes a new file every 30 seconds into a lake table. After a month, queries are slow though the data is only 200 GB. What is the likely issue and fix?

  1. A.Too many small files; compact them regularly
  2. B.The data is too big; delete the old months
  3. C.Parquet is slow; switch to CSV
  4. D.The table needs more partitions by minute
Show answer

Answer: A. Too many small files; compact them regularly

About 86,000 files a month means engines spend their time opening files and reading metadata rather than data. Regular compaction, such as OPTIMIZE in Delta or rewrite_data_files in Iceberg, merges them into files of a few hundred MB. Finer partitions make it worse.

26. Summing account balances over time

A daily snapshot fact stores each bank account's closing balance. An analyst sums balance across all 31 days of March to get March's balance. What is wrong?

  1. A.Nothing; balances are fully additive
  2. B.Balances add across accounts but not across days
  3. C.Balances cannot be summed across accounts either
  4. D.The sum must be divided by the number of accounts
Show answer

Answer: B. Balances add across accounts but not across days

A balance is semi-additive: you can sum it across accounts on one day, but summing over days counts the same money 31 times. For a month, take the balance on the last day or the average daily balance. Flows like deposits are fully additive.

27. Comparing sales and returns

The sales fact and the returns fact were built by different teams with different product tables. Reports comparing them by product category disagree. What concept fixes this?

  1. A.A junk dimension for products
  2. B.A factless fact table of products
  3. C.A degenerate product dimension
  4. D.A conformed product dimension
Show answer

Answer: D. A conformed product dimension

A conformed dimension has the same keys, attributes and meaning wherever it is used. When both facts join to one product dimension, a category means the same thing in both, so results line up. Kimball's bus matrix plans these shared dimensions across subject areas.

28. A repeated query returns instantly

A user runs the same Snowflake query twice, ten minutes apart. The second run returns in milliseconds and uses no warehouse time. Why?

  1. A.The warehouse was resized automatically
  2. B.The table was clustered between runs
  3. C.The query was moved to another account
  4. D.The result cache, as the data had not changed
Show answer

Answer: D. The result cache, as the data had not changed

Snowflake keeps query results for 24 hours. If the same query text runs again and the underlying data has not changed, it returns the cached result without using a warehouse. Functions like CURRENT_TIMESTAMP or changed data prevent reuse.

29. Cloning a 5 TB database for testing

You run CREATE DATABASE dev CLONE prod on a 5 TB Snowflake database. What happens to storage right after?

  1. A.Almost no extra storage; you pay only for later changes
  2. B.Another 5 TB is copied and billed at once
  3. C.The clone holds only table definitions, no data
  4. D.Prod becomes read-only while the clone exists
Show answer

Answer: A. Almost no extra storage; you pay only for later changes

A zero-copy clone shares the same micro-partitions as the source, so creating it is fast and adds almost no storage. When either side changes data, only the new or changed micro-partitions are stored separately. It is ideal for test environments and safe experiments.

30. How Snowflake skips data

A Snowflake query filters WHERE order_date = '2026-03-15' on a large table. How does Snowflake avoid scanning every row?

  1. A.It looks up a B-tree index built on order_date
  2. B.It skips micro-partitions using min/max metadata
  3. C.It reads only the first 1,000 rows
  4. D.It asks the user to choose partitions
Show answer

Answer: B. It skips micro-partitions using min/max metadata

Snowflake stores tables in micro-partitions of roughly 50–500 MB uncompressed and keeps metadata such as min and max per column. Partitions whose order_date range cannot include the date are pruned. Pruning works best when data is naturally ordered or clustered by that column.

31. Querying JSON arrays in Snowflake

A Snowflake table stores raw orders as JSON in a VARIANT column, with an items array inside. How do you get one row per item?

  1. A.Use SPLIT_PART on the JSON text
  2. B.Cast the column to VARCHAR and use LIKE
  3. C.Use LATERAL FLATTEN on the items array
  4. D.Create a view with GROUP BY items
Show answer

Answer: C. Use LATERAL FLATTEN on the items array

FLATTEN turns an array or object into rows, and LATERAL lets each output row see its parent row. You then pick fields with path syntax like f.value:sku::string. VARIANT keeps semi-structured data queryable without a fixed schema up front.

32. A dashboard that aggregates every minute

A dashboard runs the same daily-revenue aggregation over a large BigQuery table every minute. Which feature keeps the result precomputed and refreshed as new data arrives?

  1. A.A materialized view
  2. B.A standard view
  3. C.A table snapshot
  4. D.A wildcard table
Show answer

Answer: A. A materialized view

A BigQuery materialized view stores the precomputed result and refreshes it incrementally as the base table changes. Queries against it, and sometimes against the base table, read far fewer bytes. A standard view is just saved SQL and recomputes every time.

33. Speeding up a Redshift COPY

Loading one 60 GB gzip file into Redshift with COPY is slow. What usually speeds it up most?

  1. A.Split it into many files of similar size
  2. B.Load it row by row with INSERT statements
  3. C.Convert it to an uncompressed Excel file
  4. D.Turn off compression on the target table
Show answer

Answer: A. Split it into many files of similar size

COPY loads files in parallel across slices, and one large gzip file cannot be split, so a single slice does most of the work. Many files of similar size let every slice work at once. Single-row INSERTs are the slowest way to load Redshift.

34. Applying a batch of changes

Each hour you receive changed customer rows: some new, some updated. Which single SQL statement applies them to the target table?

  1. A.INSERT INTO target SELECT * FROM changes
  2. B.TRUNCATE target, then INSERT changes
  3. C.UPDATE target SET ... FROM changes
  4. D.MERGE with WHEN MATCHED and WHEN NOT MATCHED
Show answer

Answer: D. MERGE with WHEN MATCHED and WHEN NOT MATCHED

MERGE matches source rows to target rows by key, updating matches and inserting new ones in one atomic statement. A plain INSERT would duplicate updated customers, and TRUNCATE would lose everyone not in the batch. Make sure the source has one row per key, or MERGE may fail.

35. Adding a column on purpose

The new coupon_code column is expected and should be added to the Delta table on the next append. What option allows this?

  1. A.option('mergeSchema', 'true') on the write
  2. B.option('overwriteSchema', 'false')
  3. C.Writing in CSV format
  4. D.Running VACUUM first
Show answer

Answer: A. option('mergeSchema', 'true') on the write

mergeSchema lets a write add new columns to the table schema, and old rows read them as null. overwriteSchema replaces the schema entirely and is used with overwrite mode. Explicit evolution keeps schema changes deliberate and visible in history.

36. Old snapshots fill object storage

An Iceberg table gets hourly MERGE jobs, and storage keeps growing though the live data is stable. Old snapshots are never cleaned. What maintenance is needed?

  1. A.Rename the table each month
  2. B.Expire old snapshots
  3. C.Add more partitions
  4. D.Switch the table to CSV
Show answer

Answer: B. Expire old snapshots

Each commit creates a snapshot, and files replaced by MERGE stay because older snapshots still point to them. expire_snapshots removes old snapshots, and the files only they used are then deleted. Keep enough history for time travel needs; remove_orphan_files cleans leftovers from failed jobs.

37. Filtering on a non-partition column

A Delta table is partitioned by date, but most queries also filter on customer_id, and every file in a date must be read. What layout feature helps skip files?

  1. A.Partitioning by customer_id as well
  2. B.Converting the table to JSON
  3. C.Z-ordering or liquid clustering on customer_id
  4. D.Turning off data skipping statistics
Show answer

Answer: C. Z-ordering or liquid clustering on customer_id

Z-ordering and liquid clustering rewrite data so similar customer_id values sit in the same files. Each file's min and max statistics then cover a narrow range, so most files are skipped. Partitioning by a high-cardinality column like customer_id would create millions of tiny folders.

38. Why a status column compresses well

A Parquet column status has only five distinct values across 100 million rows. Which Parquet feature makes it very small on disk?

  1. A.Row-oriented storage
  2. B.Gzip applied to the whole file only
  3. C.Storing the column as JSON
  4. D.Dictionary and run-length encoding
Show answer

Answer: D. Dictionary and run-length encoding

Parquet can store a column's distinct values once in a dictionary and then write short integer codes, which run-length encoding compresses further when values repeat. Low-cardinality columns like status shrink enormously. Compression codecs such as Snappy or zstd are applied on top.

39. Capping monthly Snowflake spend

Finance wants a warning when a Snowflake warehouse reaches 80% of its 500-credit monthly budget, and for it to be suspended at 100%. Which feature does this?

  1. A.A masking policy on the warehouse
  2. B.A resource monitor with notify and suspend triggers
  3. C.A zero-copy clone of the account
  4. D.A multi-cluster warehouse in economy mode
Show answer

Answer: B. A resource monitor with notify and suspend triggers

Resource monitors track credit use for warehouses or the account over a period. Triggers at set percentages can notify, suspend after running queries finish, or suspend at once. They are a basic guard against runaway costs.

40. Reading a parameter in BigQuery

In the GA4 BigQuery export, event parameters are a repeated field. What does this query return?

  1. A.An error, because page_location is a top-level column
  2. B.An error, because UNNEST only works on the items field
  3. C.One row per page_view with its page_location value
  4. D.One row per parameter, so each event is repeated
Show answer

Answer: C. One row per page_view with its page_location value

event_params is an array of key and value records, so you UNNEST it and pick the key you need. Doing it inside a scalar subquery keeps one row per event. String values live in value.string_value, numbers in int_value or double_value.

Data Warehousing interview questions for experienced candidates hard

41. Why table formats exist

What key problem do open table formats like Apache Iceberg and Delta Lake solve compared with plain Parquet files in object storage?

  1. A.They make Parquet files smaller by using a new compression algorithm
  2. B.They replace SQL with a new query language
  3. C.They add a transaction log and metadata layer for ACID commits, schema evolution, time travel and safe concurrent writes
  4. D.They only work on local disks, which is faster
Show answer

Answer: C. They add a transaction log and metadata layer for ACID commits, schema evolution, time travel and safe concurrent writes

Plain files in a folder have no atomic commits, so readers can see half-written data and concurrent writers can clash. Table formats track which files belong to each snapshot, giving ACID transactions, time travel, schema evolution and efficient file-level pruning.

42. Distinct users on billions of rows

A dashboard needs daily unique users across 20 billion events. COUNT(DISTINCT user_id) is slow and costly, and a 1 to 2 percent error is fine. What is the best approach?

  1. A.Use COUNT(*) instead
  2. B.Sample 10 rows per day
  3. C.Use an approximate function such as APPROX_COUNT_DISTINCT (HyperLogLog), optionally storing HLL sketches per day to merge later
  4. D.Export the data to a spreadsheet
Show answer

Answer: C. Use an approximate function such as APPROX_COUNT_DISTINCT (HyperLogLog), optionally storing HLL sketches per day to merge later

Exact distinct counts must track every unique value and often require large shuffles. HyperLogLog estimates cardinality with a small fixed memory and about one percent error. Storing sketches lets you merge days into weeks or months without rescanning raw events, which a stored exact count cannot do.

43. Iceberg hidden partitioning

An Iceberg table is partitioned by day(event_ts). It has grown, and you switch new data to hour(event_ts). What happens to existing queries that filter on event_ts?

  1. A.They break until every query adds an event_hour column
  2. B.All old data must be rewritten before the change is allowed
  3. C.Queries fall back to scanning the whole table forever
  4. D.They keep working unchanged; Iceberg prunes old files by the day spec and new files by the hour spec
Show answer

Answer: D. They keep working unchanged; Iceberg prunes old files by the day spec and new files by the hour spec

Iceberg stores partition transforms in table metadata, so users filter on the real column and never reference partition columns directly. Partition evolution changes the spec for new writes only, and each data file remembers the spec it was written with. Planning prunes both generations without a rewrite.

44. Clustering for two filter columns

Queries on a large lakehouse table filter by customer_id in some reports and by product_id in others. Sorting by customer_id alone makes the product queries scan almost everything. What helps both?

  1. A.Partition by both columns, creating millions of folders
  2. B.Convert the table to CSV
  3. C.Sort by product_id only
  4. D.Multi-dimensional clustering such as Z-ordering or liquid/Hilbert clustering on both columns, so file min/max ranges are tight for each
Show answer

Answer: D. Multi-dimensional clustering such as Z-ordering or liquid/Hilbert clustering on both columns, so file min/max ranges are tight for each

A linear sort makes ranges tight only for the first sort column. Space-filling curves like Z-order or Hilbert interleave several columns so each file covers a narrow range of both, improving data skipping for either filter. Partitioning on two high-cardinality columns would cause a small-files problem.

45. A new CSV column shifts the data

A partner adds a discount column in the middle of a daily CSV. Your loader maps columns by position. The load succeeds, but amounts now hold discounts. What makes the pipeline robust to this?

  1. A.Map by header name; fail on schema surprises
  2. B.Keep mapping by position but add retries
  3. C.Load all columns as text so nothing fails
  4. D.Load only the first five columns
Show answer

Answer: A. Map by header name; fail on schema surprises

Positional mapping silently shifts values when columns move. Mapping by header name, validating the header against the expected schema, and failing (or alerting) on surprises turns silent corruption into a visible error. A data contract with the partner prevents it.

46. Fast single-order lookups in Snowflake

A 6 TB Snowflake table is clustered by order_date. Support staff run many queries like WHERE order_id = 'ORD-88123', and each one scans most micro-partitions because order IDs are spread across all dates. What is the most targeted fix?

  1. A.Resize the support warehouse from Medium to 2X-Large
  2. B.Change the clustering key to (order_date, order_id)
  3. C.Rely on the result cache, since lookups often repeat
  4. D.Enable search optimization on the order_id column
Show answer

Answer: D. Enable search optimization on the order_id column

Search optimization builds a persistent access path that lets Snowflake skip micro-partitions for selective equality filters on high-cardinality columns, whatever the clustering. A bigger warehouse only scans the same partitions faster at a higher cost, and the result cache helps only when an identical query repeats. A compound key led by order_date does little for filters on order_id alone.

47. A fact table with no measures

A school wants to analyse which students attended which classes on which days. There is no amount or quantity. How is this modelled?

  1. A.As a dimension table with a date column
  2. B.It cannot be modelled in a star schema
  3. C.As a factless fact table with keys to student, class and date
  4. D.As a single wide table with one column per class
Show answer

Answer: C. As a factless fact table with keys to student, class and date

A factless fact table records that an event happened, using only foreign keys to dimensions. Counting rows answers questions like attendance per class. It can also record coverage, such as which products were on promotion, to find what did not sell.

48. Where the invoice number lives

Each order line fact row carries the invoice number. There is nothing else to describe about the invoice. How is invoice number usually modelled?

  1. A.As a degenerate dimension stored on the fact row
  2. B.As its own dimension table with one column
  3. C.As a measure that can be summed
  4. D.As part of the date dimension
Show answer

Answer: A. As a degenerate dimension stored on the fact row

A degenerate dimension is a dimension key with no attributes, kept directly in the fact table. Invoice or order numbers are classic examples: useful for grouping lines and tracing back to the source, but a separate table would add nothing.

49. Many small flag columns

An order fact has six low-cardinality flags such as is_gift, payment_type and is_express. Which design keeps the fact table narrow without losing them?

  1. A.Drop the flags, since they are rarely used
  2. B.Combine them into one junk dimension of flag combinations
  3. C.Make each flag its own dimension table
  4. D.Store them as a JSON string in the date dimension
Show answer

Answer: B. Combine them into one junk dimension of flag combinations

A junk dimension holds the distinct combinations of small flags, and the fact gets one key to it. Six flags with a few values each only make a few hundred rows. This avoids six tiny dimensions or six extra columns on a huge fact.

50. Billing for a ten-second query

A suspended Snowflake warehouse resumes for a 10-second query and is suspended right after. How much compute time is billed?

  1. A.10 seconds
  2. B.1 hour
  3. C.60 seconds
  4. D.Nothing, since it was suspended
Show answer

Answer: C. 60 seconds

Snowflake bills warehouses per second with a 60-second minimum each time a warehouse starts or resumes. Many tiny queries that each wake a warehouse can cost far more than their run time suggests. Batching work or a sensible auto-suspend setting reduces this.

51. A query that spills to remote storage

Snowflake's query profile shows a large join with many GB 'spilled to remote storage', and the query is very slow. What is the usual fix?

  1. A.Turn off the result cache
  2. B.Add more clusters to the multi-cluster warehouse
  3. C.Use a larger warehouse or reduce the data entering the join
  4. D.Set a shorter auto-suspend time
Show answer

Answer: C. Use a larger warehouse or reduce the data entering the join

Spilling means the operation ran out of memory and wrote intermediate data to local disk, then to remote storage, which is very slow. A larger warehouse has more memory per query, and filtering or pre-aggregating earlier shrinks the join. Extra clusters help concurrency, not one big query.

52. Staging tables that cost too much

Staging tables in Snowflake are fully reloaded every night from S3, so their data can always be rebuilt. Storage bills show a lot of Time Travel and Fail-safe bytes for them. What change cuts this cost?

  1. A.Turn off auto-suspend on the load warehouse
  2. B.Cluster the staging tables by load date
  3. C.Make them transient tables with short Time Travel
  4. D.Clone the staging tables before every nightly load
Show answer

Answer: C. Make them transient tables with short Time Travel

Permanent tables keep changed and deleted data for Time Travel plus 7 days of Fail-safe, so a nightly full reload stores many old copies. Transient tables have no Fail-safe and at most 1 day of Time Travel. They suit data you can always reload, not data you cannot rebuild.

53. Changing partitioning on a live table

An Iceberg table was partitioned by month, but data grew and daily partitions are now needed. What does Iceberg partition evolution allow?

  1. A.It forces a full rewrite of all old data first
  2. B.It is not possible; a new table is required
  3. C.It only works if the table is empty
  4. D.New files use the daily spec; old ones stay monthly
Show answer

Answer: D. New files use the daily spec; old ones stay monthly

Iceberg stores the partition spec in metadata, and each data file records which spec it was written with. You can change the spec, and new writes use it while old files stay as they are. Queries plan across both specs, so no rewrite is needed.

54. How Iceberg plans a query

Iceberg plans scans without listing directories. In which order does it read its metadata to find data files?

  1. A.Data files, then manifests, then the metadata file
  2. B.Metadata file, then manifest list, then manifest files, then data files
  3. C.Directory listing, then partition folders, then data files
  4. D.Manifest files, then the catalog, then the metadata file
Show answer

Answer: B. Metadata file, then manifest list, then manifest files, then data files

The table metadata file points to the current snapshot's manifest list. The manifest list holds partition ranges per manifest, and each manifest lists data files with column stats. Pruning happens at every level, so planning stays fast even with millions of files.

55. Reading a Delta table as Iceberg

Data is written with Delta Lake on Databricks, but another team's engine only reads Iceberg. Which feature lets them read the same files without a copy?

  1. A.Delta change data feed
  2. B.VACUUM with zero retention
  3. C.Converting the table to ORC
  4. D.Delta UniForm
Show answer

Answer: D. Delta UniForm

UniForm generates Iceberg (and Hudi) metadata alongside the Delta log for the same Parquet files. Iceberg readers then see the table without data duplication. This works because all these formats share Parquet data files and differ mainly in metadata.

56. Checking data before readers see it

A team wants each day's load written to an Iceberg table, checked by data quality tests, and only then made visible to readers. Which Iceberg feature supports this write-audit-publish flow?

  1. A.Partition evolution on the daily column
  2. B.Hidden partitioning by load date
  3. C.Snapshot expiry after each load
  4. D.Branches, with main fast-forwarded after tests
Show answer

Answer: D. Branches, with main fast-forwarded after tests

Iceberg branches are named snapshot lines. The job writes to an audit branch, tests run against it, and if they pass main is fast-forwarded to that snapshot. Readers on main never see unchecked data, and a failed load is simply discarded.

57. Monthly users from daily users

A summary table stores daily active users per day. An analyst sums the 30 daily values to report monthly active users. What is wrong?

  1. A.Nothing; daily users always add up to monthly users
  2. B.The sum undercounts, since some days are missing
  3. C.It should be the average of the 30 values
  4. D.Users active on several days are counted many times
Show answer

Answer: D. Users active on several days are counted many times

Distinct counts are not additive: a user active on 20 days appears in 20 daily counts but is one monthly user. Compute monthly actives from user-level data, or store mergeable sketches such as HyperLogLog per day and merge them. The average of daily values answers a different question.

58. Counting sessions in BigQuery

Which expression correctly counts sessions in the GA4 BigQuery export?

  1. A.COUNT(DISTINCT CONCAT(user_pseudo_id, CAST(sid AS STRING)))
  2. B.COUNT(DISTINCT CAST(sid AS STRING)) over all users
  3. C.COUNTIF(event_name = 'session_start') + COUNT(DISTINCT sid)
  4. D.COUNT(DISTINCT user_pseudo_id) grouped by event_date
Show answer

Answer: A. COUNT(DISTINCT CONCAT(user_pseudo_id, CAST(sid AS STRING)))

ga_session_id (sid) is a start timestamp, so two users can share one value; it is only unique when combined with user_pseudo_id. Counting page_view events counts views, and distinct user_pseudo_id counts users, not sessions.

59. UI and BigQuery user counts differ

Your exact COUNT(DISTINCT user_pseudo_id) in BigQuery is 1.6% different from Total users in the GA4 interface for the same days. Most likely reason?

  1. A.BigQuery export drops all users from mobile apps
  2. B.GA4 reports estimate unique counts with HyperLogLog++
  3. C.The GA4 interface counts each session as a user
  4. D.BigQuery stores users in UTC, which adds new users
Show answer

Answer: B. GA4 reports estimate unique counts with HyperLogLog++

GA4 uses the HyperLogLog++ algorithm to estimate distinct counts like users and sessions in reports, which gives small differences. Other causes include thresholding, consent modelling and time zones, but a gap of one or two percent is typical of estimation.

60. Sampled exploration results

A free exploration over 14 months on a large property shows a "sampled" badge. What is the sound response?

  1. A.Ignore it; sampling only affects the chart colours
  2. B.Switch the reporting identity to fix sampling
  3. C.Shorten the date range or query BigQuery for exact numbers
  4. D.Add more dimensions so GA4 uses the full data
Show answer

Answer: C. Shorten the date range or query BigQuery for exact numbers

Explorations are sampled when a query passes the event quota (10 million events for standard properties). Shorter ranges reduce the events scanned, and the BigQuery export gives unsampled raw data. Standard reports are not sampled.

Ready to test yourself?

Take a 15-question Data Warehousing MCQ test with a score at the end, or practise the full Data Warehousing question bank and earn points on the leaderboard.