FREQUENTLY ASKED SNOWFLAKE DEVELOPER INTERVIEW QUESTIONS
In this post, we are going to explore snowflake interview questions. Topics Covered are Snowflake Architecture, warehouse, types of constraints, types of tables, types of stages, and snowflake indexes.
This will majorly cover all the theoretical questions, starting with the basics and moving to advanced concepts. Hoping that it will be helpful and wishing the best for your interview.
Q1: What is Snowflake and how it is different from other databases?
Snowflake database is a cloud-based data warehouse-as-a-cloud-service i.e. SaaS that requires no hardware or software installation.
Advantages of Snowflake databases are
- Build on cloud
- Unlimited storage
- Data is encrypted by default
- Simple and transparent pricing
- Moves to idle mode when not used
- Time travel (1 - 90 days)
Q2: Explain the snowflake architecture?
Snowflake Architecture |
- Collection of services that coordinate activities across snowflake.
- Services managed in this layer include: Authentication, Metadata management, Query parsing and optimization and Access control
Query processing
- Uses virtual warehouses. Each virtual warehouse is a compute cluster connected to multiple nodes allocated by a snowflake.
- Each virtual warehouse is an independent compute cluster that does not share compute resources with other virtual warehouses. As a result, each virtual warehouse has no impact on the performance of other virtual warehouses.
Database storage
- Snowflake reorganize the data into its internal optimized, compressed, and columnar format.
- Data stored in snowflake can be accessed only using SQL queries.
Q3: What is shared disk and shared-nothing architecture?
Shared disk – It has a central repository for persisted data
that is accessible from all the computable nodes.
Shared nothing – Uses massive parallel processing (MPP). Compute
clusters where each node in the cluster stores a portion of the entire data set
locally.
Q4: What are the different types of warehouse size?
- XSMALL
- SMALL
- MEDIUM
- LARGE
- XLARGE
- XXLARGE
- XXXLARGE
- X4LARGE
Q5: What are the types of constraints in Snowflake?
Unique – To uniquely identify value, NULL is
allowed.
Primary key – To uniquely identify each
record, NULL is not allowed.
Foreign key - Primary key of another table,
used to define the relationship between the tables.
NOT NULL - NULL values are not allowed.
Q6: Does Snowflake support indexes?
Snowflake does not use indexes. This is one of the things that makes Snowflake scale so well for arbitrary queries.
Q7: What is a surrogate key?
Q8: What are the different types of tables in Snowflake?
Temporary Table – Stores non-permanent,
transitory data.
- Only exists within the session, will not be visible to other users.
Permanent Table – Available until explicitly
dropped.
- Has fail-safe period.
Transient Table - Available until explicitly
dropped.
- Doesn’t have a fail-safe period, can prefer when the data doesn’t require the same level of data protection and recovery as the permanent table.
External Tables - When queried, an external table reads the data set
from a set of files in an external stage.
No comments:
Post a Comment