Prev Next

Database / Snowflake Interview Questions

1. What is Snowflake and how does its multi-cluster, shared-data architecture differ from traditional data warehouses? 2. What are the three layers of Snowflake's architecture (Storage, Compute, Cloud Services) and what does each do? 3. What is a Virtual Warehouse in Snowflake and how does it scale independently of storage? 4. What is the difference between Snowflake's columnar storage and row-based storage in traditional RDBMS? 5. What is the Snowflake Cloud Services layer and what components does it manage? 6. What are micro-partitions in Snowflake and how do they enable automatic data clustering? 7. What is data clustering in Snowflake and when should you define a clustering key? 8. What is the difference between Snowflake Standard, Enterprise, Business Critical, and Virtual Private Snowflake edition? 9. How does Snowflake handle multi-cloud deployment and cross-cloud replication? 10. What is Snowflake's separation of compute from storage and what billing advantages does it provide? 11. What are the stages in Snowflake (internal vs external) and how do you use them for data loading? 12. How does the COPY INTO command work and what file formats does it support? 13. What is Snowpipe and how does it enable continuous / serverless data ingestion? 14. What is the difference between bulk loading with COPY INTO and micro-batch loading with Snowpipe? 15. How does Snowflake handle semi-structured data (JSON, Avro, Parquet, ORC) with the VARIANT type? 16. What are Snowflake Dynamic Tables and how do they differ from regular tables and views? 17. What is Time Travel in Snowflake and how does it work (retention period, UNDROP, AT/BEFORE)? 18. What is Fail-safe in Snowflake and how does it differ from Time Travel? 19. What is the Snowflake Query Profile and how do you use it to diagnose slow queries? 20. What is result caching in Snowflake and under what conditions does it apply? 21. What is the metadata cache (Cloud Services layer cache) and how does it speed up queries? 22. What is a clustering key and how does it reduce partition pruning cost for large tables? 23. What are Snowflake Materialized Views and when should you use them over regular views? 24. What is the difference between a Snowflake View, Materialized View, and Dynamic Table? 25. How do you optimize query performance in Snowflake (warehouse sizing, clustering, pruning, result cache)? 26. What are Snowflake Streams and how do they implement Change Data Capture (CDC)? 27. What are Snowflake Tasks and how do you schedule SQL transformations with them? 28. How does Snowflake implement Role-Based Access Control (RBAC) and what are the system-defined roles? 29. What is column-level security in Snowflake (Dynamic Data Masking and Column-level Security policies)? 30. What is Row Access Policy in Snowflake and how does it implement row-level security? 31. How does Snowflake encrypt data at rest and in transit? 32. What is Snowflake's Tri-Secret Secure model and when is it used? 33. What are Snowflake Object Tags and Data Classification and how do they support governance? 34. What is the Snowflake Access History feature and how does it support audit and compliance? 35. What is Snowflake Secure Data Sharing and how does it work without copying data? 36. What is the Snowflake Data Marketplace and what types of data products are available? 37. What are Snowflake Data Clean Rooms and what privacy problems do they solve? 38. What is Snowpark and how does it allow Python/Java/Scala code to run inside Snowflake? 39. What are Snowflake Native Apps and how does the Native App Framework work? 40. What are Snowflake External Tables and when would you use them over internal tables? 41. What is Snowflake's multi-cluster warehouse and how does it handle concurrency auto-scaling? 42. What is Resource Monitor in Snowflake and how do you use it to control credit consumption? 43. How does Snowflake support ELT patterns and how does it compare to ETL? 44. What are common Snowflake anti-patterns and performance pitfalls to avoid? 45. How does Snowflake compare to BigQuery and Redshift in architecture and pricing model?

1. What is Snowflake and how does its multi-cluster, shared-data architecture differ from traditional data warehouses?

Snowflake is a cloud-native data platform delivered as a fully managed SaaS, built on cloud object storage (S3, Azure Blob, GCS). Its defining architectural trait is complete decoupling of storage from compute, setting it apart from every traditional warehouse model....

Read full answer

2. What are the three layers of Snowflake's architecture (Storage, Compute, Cloud Services) and what does each do?

Snowflake is built on three independently operating layers, each with a clearly defined responsibility. Storage Layer holds all data as columnar, compressed micro-partition files in cloud object storage (S3, Azure Blob, or GCS)....

Read full answer

3. What is a Virtual Warehouse in Snowflake and how does it scale independently of storage?

A Virtual Warehouse is a named MPP compute cluster in Snowflake that executes SQL queries, loads data, and performs DML operations. Unlike traditional databases where compute and storage share the same physical nodes, a Virtual Warehouse borrows cloud compute on...

Read full answer

4. What is the difference between Snowflake's columnar storage and row-based storage in traditional RDBMS?

In row-based storage (MySQL, PostgreSQL, Oracle), a complete row is written as a contiguous block on disk. This is optimal for OLTP: a single-row read or update is one I/O....

Read full answer

5. What is the Snowflake Cloud Services layer and what components does it manage?

The Cloud Services layer is Snowflake's always-on intelligence layer. It runs within Snowflake's managed infrastructure — not on customer-provisioned resources — and coordinates everything before and after a Virtual Warehouse executes a query....

Read full answer

6. What are micro-partitions in Snowflake and how do they enable automatic data clustering?

Micro-partitions are the fundamental storage units in Snowflake. When data is loaded, Snowflake automatically divides it into contiguous blocks of 50–500 MB of uncompressed data (typically ~16 MB compressed on disk)....

Read full answer

7. What is data clustering in Snowflake and when should you define a clustering key?

Data clustering describes how closely the physical order of rows across micro-partitions aligns with the columns used in query predicates. When data is well-clustered on a column, rows with similar values land in the same micro-partitions....

Read full answer

8. What is the difference between Snowflake Standard, Enterprise, Business Critical, and Virtual Private Snowflake edition?

Snowflake offers four service editions, each a strict superset of the previous. Edition choice is driven primarily by compliance requirements, data sensitivity, and advanced concurrency needs.

Read full answer

9. How does Snowflake handle multi-cloud deployment and cross-cloud replication?

Snowflake accounts are created on a specific cloud platform (AWS, Azure, or GCP) and in a specific region. While the primary account is tied to that choice, Snowflake supports replicating data and account objects across regions and even across cloud...

Read full answer

10. What is Snowflake's separation of compute from storage and what billing advantages does it provide?

In Snowflake, storage and compute are billed as completely independent resources. Storage is charged at a flat rate per terabyte per month of compressed data in cloud object storage, regardless of query volume....

Read full answer

11. What are the stages in Snowflake (internal vs external) and how do you use them for data loading?

Internal stages store files in Snowflake-managed storage. External stages point at S3, Azure Blob, or GCS. COPY INTO loads from either stage type.

Read full answer

12. How does the COPY INTO command work and what file formats does it support?

COPY INTO is Snowflake's bulk data loading command. It reads files from a stage (internal or external) and loads them into a target table in a single transactional operation....

Read full answer

13. What is Snowpipe and how does it enable continuous / serverless data ingestion?

Snowpipe is Snowflake's serverless, event-driven data ingestion service. Unlike COPY INTO which requires a running Virtual Warehouse and an explicit trigger, Snowpipe uses Snowflake-managed serverless compute and fires automatically when new files arrive in a stage....

Read full answer

14. What is the difference between bulk loading with COPY INTO and micro-batch loading with Snowpipe?

COPY INTO and Snowpipe both load files from stages into Snowflake tables, but they differ fundamentally in trigger mechanism, compute model, transaction semantics, and cost structure. COPY INTO vs Snowpipe Dimension COPY INTO (Bulk) Snowpipe (Micro-batch) Trigger Explicit SQL command...

Read full answer

15. How does Snowflake handle semi-structured data (JSON, Avro, Parquet, ORC) with the VARIANT type?

Snowflake stores semi-structured data in a VARIANT column — a flexible container that holds any valid JSON, Avro, Parquet, ORC, or XML value up to 16 MB per cell. Unlike traditional columns, VARIANT does not require a predefined schema....

Read full answer

16. What are Snowflake Dynamic Tables and how do they differ from regular tables and views?

A Dynamic Table is a Snowflake object that automatically maintains the result of a defining SQL query and refreshes it to stay within a user-specified staleness limit. You declare what you want the table to contain and how fresh it...

Read full answer

17. What is Time Travel in Snowflake and how does it work (retention period, UNDROP, AT/BEFORE)?

Time Travel is Snowflake's ability to query, clone, or restore data as it existed at any point within a configurable retention window. When a row is deleted or updated, Snowflake does not immediately remove the old micro-partitions — it retains...

Read full answer

18. What is Fail-safe in Snowflake and how does it differ from Time Travel?

Fail-safe is an additional 7-day data protection period that begins after a table's Time Travel retention window expires. It is Snowflake's last-resort disaster recovery safety net — but unlike Time Travel, it is not accessible to customers directly....

Read full answer

19. What is the Snowflake Query Profile and how do you use it to diagnose slow queries?

Query Profile is Snowflake's built-in visual execution plan viewer, available in Snowsight under Query History for any completed or actively running query. It shows the full operator tree for a query execution — every node representing a distinct processing step...

Read full answer

20. What is result caching in Snowflake and under what conditions does it apply?

Result caching stores the complete output of a query in the Cloud Services layer for 24 hours. When an identical query runs again within that window, Snowflake returns the cached result instantly — no warehouse compute is consumed, no storage...

Read full answer

21. What is the metadata cache (Cloud Services layer cache) and how does it speed up queries?

The metadata cache lives entirely within the Cloud Services layer and is separate from both the result cache and the local SSD cache on Virtual Warehouse nodes. It stores structural and statistical information about every micro-partition for every table: per-column...

Read full answer

22. What is a clustering key and how does it reduce partition pruning cost for large tables?

A clustering key is a column (or expression) declared on a Snowflake table that tells Snowflake to physically sort and co-locate rows with similar values into the same micro-partitions. When the key is a date column, all rows for a...

Read full answer

23. What are Snowflake Materialized Views and when should you use them over regular views?

A Materialized View (MV) in Snowflake is a pre-computed, physically stored snapshot of a SELECT query's result. Unlike a regular view that re-executes its SQL every time it is queried, an MV stores the result as a table that Snowflake...

Read full answer

24. What is the difference between a Snowflake View, Materialized View, and Dynamic Table?

These three object types all provide an abstraction layer over raw tables, but they differ fundamentally in whether they store data physically, how they refresh, and what query patterns they support. View vs Materialized View vs Dynamic Table Dimension Regular...

Read full answer

25. How do you optimize query performance in Snowflake (warehouse sizing, clustering, pruning, result cache)?

Snowflake query optimization covers four levers, each addressing a different root cause. Using the wrong lever wastes money without helping performance....

Read full answer

26. What are Snowflake Streams and how do they implement Change Data Capture (CDC)?

A Snowflake Stream is a named object that records row-level DML changes (INSERT, UPDATE, DELETE) made to a source table since the stream was last consumed. It works like a bookmark: each time you read the stream inside a DML...

Read full answer

27. What are Snowflake Tasks and how do you schedule SQL transformations with them?

A Task is a named Snowflake object that executes a single SQL statement (or a stored procedure call) on a defined schedule. Tasks are the native scheduling mechanism for data transformations inside Snowflake — no external orchestration tool is required...

Read full answer

28. How does Snowflake implement Role-Based Access Control (RBAC) and what are the system-defined roles?

In Snowflake's RBAC model, privileges are granted to roles , and roles are granted to users or other roles (creating a role hierarchy). A user acquires the union of all privileges from every role in their active role tree....

Read full answer

29. What is column-level security in Snowflake (Dynamic Data Masking and Column-level Security policies)?

Column-level security in Snowflake is implemented through Dynamic Data Masking (DDM) policies. A masking policy defines a SQL expression — typically a CASE statement on CURRENT_ROLE() or IS_ROLE_IN_SESSION() — that returns either the real column value or a masked substitute...

Read full answer

30. What is Row Access Policy in Snowflake and how does it implement row-level security?

A Row Access Policy (RAP) is a Snowflake security object that transparently injects an additional filter predicate into every query that touches the protected table. From the querying user's perspective, their SQL is unchanged — they simply receive fewer rows....

Read full answer

31. How does Snowflake encrypt data at rest and in transit?

Snowflake enforces encryption universally — it cannot be disabled. Every byte of customer data is always encrypted, both when stored in cloud object storage and when moving across networks....

Read full answer

32. What is Snowflake's Tri-Secret Secure model and when is it used?

Tri-Secret Secure is Snowflake's highest tier of data protection. It ensures that data can only be decrypted when two independent keys are simultaneously present: Snowflake's own master key and a Customer-Managed Key (CMK) held in the customer's own cloud KMS...

Read full answer

33. What are Snowflake Object Tags and Data Classification and how do they support governance?

Object Tags are key-value string metadata labels that can be attached to any Snowflake object — accounts, databases, schemas, tables, columns, warehouses, or other named resources. Tags give governance teams a structured way to label assets by sensitivity level, data...

Read full answer

34. What is the Snowflake Access History feature and how does it support audit and compliance?

Access History records every query that accessed specific database objects — tracking exactly which tables and columns were read or written, by which user, running which role, at what time. It is the foundation for data lineage auditing, regulatory compliance...

Read full answer

35. What is Snowflake Secure Data Sharing and how does it work without copying data?

Secure Data Sharing lets a Snowflake account (the data provider ) grant another Snowflake account (the data consumer ) live read access to specific objects — without ever copying, moving, or exporting the data. The consumer's Virtual Warehouse reads directly...

Read full answer

36. What is the Snowflake Data Marketplace and what types of data products are available?

The Snowflake Data Marketplace is a hub within Snowflake where data providers publish and monetize data products, and data consumers discover and access them — all powered by Secure Data Sharing. When a consumer subscribes to a listing, they receive...

Read full answer

37. What are Snowflake Data Clean Rooms and what privacy problems do they solve?

Data Clean Rooms (DCRs) are privacy-preserving environments where two or more parties can run collaborative analytics on a union of their datasets without either party being able to see the other's raw records. Snowflake implements Clean Rooms on top of...

Read full answer

38. What is Snowpark and how does it allow Python/Java/Scala code to run inside Snowflake?

Snowpark is Snowflake's developer framework that lets you write Python, Java, or Scala code that executes inside the Snowflake engine rather than pulling data to an external machine. The core abstraction is the Snowpark DataFrame , which works like Apache...

Read full answer

39. What are Snowflake Native Apps and how does the Native App Framework work?

Snowflake Native Apps are full applications that a provider packages once and consumers install directly into their own Snowflake account. The Native App Framework is the platform layer that enables this — combining Snowpark code, data shares, Streamlit UI components,...

Read full answer

40. What are Snowflake External Tables and when would you use them over internal tables?

An External Table is a read-only Snowflake object that maps a schema onto files stored in an external stage (S3, Azure Blob, GCS) without loading the data into Snowflake-managed storage. The files stay in your own cloud bucket; Snowflake queries...

Read full answer

41. What is Snowflake's multi-cluster warehouse and how does it handle concurrency auto-scaling?

A multi-cluster warehouse is a Virtual Warehouse configured with a minimum and maximum cluster count. Instead of a single MPP cluster, Snowflake can dynamically spin up additional identical clusters to serve queued queries in parallel, eliminating the most common cause...

Read full answer

42. What is Resource Monitor in Snowflake and how do you use it to control credit consumption?

A Resource Monitor is a named Snowflake object that watches credit consumption for one or more Virtual Warehouses (or the entire account) and automatically takes action when configurable thresholds are crossed. It is the primary guardrail against runaway warehouse spend...

Read full answer

43. How does Snowflake support ELT patterns and how does it compare to ETL?

ELT (Extract, Load, Transform) loads raw data into Snowflake first, then transforms it inside using SQL or Snowpark. ETL (Extract, Transform, Load) transforms data in an external tool before loading it....

Read full answer

44. What are common Snowflake anti-patterns and performance pitfalls to avoid?

Anti-patterns in Snowflake fall into four categories: security misuse, cost mismanagement, query performance degradation, and data loading inefficiency. Common Snowflake Anti-Patterns Anti-Pattern Root Cause Fix Using ACCOUNTADMIN for daily work Violates least-privilege; accidental privilege gran

Read full answer

45. How does Snowflake compare to BigQuery and Redshift in architecture and pricing model?

These three platforms dominate cloud data warehousing and each represents a distinct architectural philosophy. Snowflake uses multi-cluster shared-data architecture: explicit Virtual Warehouses (MPP clusters) read from cloud object storage.

Read full answer

«
»

Comments & Discussions