How does Snowflake's caching interact with dbt incremental models?

Quick Overview

Asks how Snowflake's result cache, warehouse disk cache and partition metadata affect scheduled dbt incremental models. Tests knowledge of cache invalidation, warehouse suspend settings, partition pruning from incremental filters, and how to check a run in the query profile.

How does Snowflake's caching interact with dbt incremental models?

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Other

How does Snowflake's caching interact with dbt incremental models? Consider a scheduled dbt job that builds incremental models on Snowflake, and say which caches help it, which do not, and why. ```hint Ask what invalidates each cache List the caches Snowflake keeps, then check what a dbt incremental run does to the tables and the warehouse each cache depends on. ``` ### What a Strong Answer Covers - The caches Snowflake keeps and what invalidates each one - Whether an incremental run can be served from the result cache, and the effect of each run on downstream queries - How warehouse settings such as auto-suspend and warehouse sharing affect the local disk cache for dbt jobs - How partition pruning and clustering compare with caching for run time, and how to confirm which one helped ### Follow-up Questions - The MERGE in your incremental model scans the whole target table on every run. How would you find out why, and how would you fix it? - Should dbt and BI dashboards share a warehouse? What does each choice do to caching and cost? - How would you use the query profile to tell whether a faster run came from the cache or from pruning? - What changes for caching and pruning when the model reprocesses a lookback window for late-arriving data?

Overview: Asks how Snowflake's result cache, warehouse disk cache and partition metadata affect scheduled dbt incremental models. Tests knowledge of cache invalidation, warehouse suspend settings, partition pruning from incremental filters, and how to check a run in the query profile.

General logo
General
Nov 24, 2026
mediumData ScientistOtherData Manipulation (SQL/Python)
0
0

How does Snowflake's caching interact with dbt incremental models? Consider a scheduled dbt job that builds incremental models on Snowflake, and say which caches help it, which do not, and why.

What a Strong Answer Covers Guidance

  • The caches Snowflake keeps and what invalidates each one
  • Whether an incremental run can be served from the result cache, and the effect of each run on downstream queries
  • How warehouse settings such as auto-suspend and warehouse sharing affect the local disk cache for dbt jobs
  • How partition pruning and clustering compare with caching for run time, and how to confirm which one helped

Follow-up Questions Guidance

  • The MERGE in your incremental model scans the whole target table on every run. How would you find out why, and how would you fix it?
  • Should dbt and BI dashboards share a warehouse? What does each choice do to caching and cost?
  • How would you use the query profile to tell whether a faster run came from the cache or from pruning?
  • What changes for caching and pruning when the model reprocesses a lookback window for late-arriving data?