Unlocking Snowflake’s Power — Native Features Every Analytics Engineer Should Know

In the last chapter, we explored how dbt uses Snowflake under the hood: how compiled SQL gets executed in a warehouse, and what Snowflake does with that logic.
Now it's time to go deeper. Snowflake is much more than just a place where dbt runs queries—it's a powerful data platform with native features that can simplify operations, improve performance, and reduce costs.
In this post, we'll walk through 9 Snowflake-native features that every analytics engineer should know. You don't need to be an admin to use them. But knowing they exist—and how to apply them in your dbt project—can make a huge difference.
1. Time Travel
What it is:
Snowflake allows you to query data from a previous point in time, as if you were traveling back to a version of your data that existed minutes, hours, or even days ago.
Why it's useful:
Accidentally ran dbt run --full-refresh
and wiped your critical fct_revenue
table? Time Travel lets you recover it in seconds. It's an absolute lifesaver.
Good to know: The default Time Travel retention period is 1 day. For Snowflake Enterprise Edition, this can be extended up to 90 days. After that, data moves into a 7-day Fail-safe period, which can only be accessed by Snowflake Support.
Example: Query a table from 10 minutes ago
select *
from analytics.fct_revenue
at(offset => -60*10);
Example: Restore a dropped table
undrop table analytics.fct_revenue;
2. Zero-Copy Cloning
What it is:
Clone entire tables, schemas, or even databases instantly—without copying any underlying data. It works by creating a metadata layer that references the same storage.
Why it's useful:
This is perfect for dbt CI/CD. You can spin up a clone of your production data for each pull request and run your dbt tests on a real, isolated environment.
Example:
create schema analytics_dev clone analytics;
3. Row Access Policies & Column Masking
What it is:
Control access to data at a row or column level based on the user's role. A Snowflake Enterprise Edition feature.
Why it's useful:
Instead of building custom views to hide sensitive fields, apply policies directly to your tables. For example, the finance team can see all rows; marketing gets a redacted version from the same table.
Example: Mask an email column unless the user has the 'DATA_SCIENTIST' role
create masking policy mask_email as (val string) returns string ->
case when current_role() = 'DATA_SCIENTIST' then val else '********@*****.com' end;
alter table dim_customer modify column email set masking policy mask_email;
Example: Only show rows from a region based on user's role
create row access policy sales_region_policy as (region_col string) returns boolean ->
current_role() = 'SALES_MANAGER' or region_col = current_role();
alter table fct_sales set row access policy sales_region_policy on (region);
4. Tags & Object Metadata
What it is:
Tags are metadata labels you can attach to any Snowflake object—columns, tables, warehouses.
Why it's useful:
You can classify PII, track warehouse costs per team, or enforce governance rules. Tags are also queryable via the ACCOUNT_USAGE.TAG_REFERENCES
view.
Example: Create and apply a tag to a column
create or replace tag pii_tag comment = 'Personally Identifiable Information';
alter table dim_customer modify column email set tag pii_tag = 'true';
Example: Query all tagged objects
select *
from snowflake.account_usage.tag_references
where tag_name = 'PII_TAG';
5. Materialized Views
What it is:
Materialized Views are precomputed result sets that refresh automatically in the background. Available in Snowflake Enterprise Edition.
Why it's useful:
Perfect for performance-critical BI dashboards. Materialized views behave like tables but update automatically. Just know they do incur refresh and storage costs.
Example:
create materialized view mv_active_customers as
select customer_id
from dim_customer
where lifecycle_stage = 'active';
6. Query History & Warehouse Monitoring
What it is:
Snowflake tracks every query, who ran it, how long it took, and what it cost. It's your analytics observability dashboard.
Why it's useful:
Helps you pinpoint slow dbt models or find out which user is burning credits. Use INFORMATION_SCHEMA for quick access and ACCOUNT_USAGE for long-term analysis.
Example: View recent queries from the dbt user
select *
from table(information_schema.query_history())
where user_name = 'DBT_USER'
order by start_time desc
limit 100;
7. Streams & Tasks (Advanced Use)
What it is:
Streams track inserts/updates/deletes on a table. Tasks can trigger SQL logic when new changes appear in a stream.
Why it's useful:
It's Snowflake-native CDC. Instead of polling a table every hour with a dbt incremental model, let a task respond only when there's data.
Important: A stream only advances its offset when it's read as part of a DML transaction.
Example:
-- Create a stream
create or replace stream stripe_payment_stream
on table raw.stripe_payments;
-- Create a task to process it every 5 mins
create or replace task process_stripe_changes
warehouse = transform_wh
schedule = '5 minute'
when system$stream_has_data('stripe_payment_stream')
as
merge into analytics.stg_stripe_payments as target
using raw.stripe_payment_stream as source
on target.payment_id = source.id
when matched then update set ...
when not matched then insert ...;
8. User-Defined Functions (UDFs)
What it is:
Reusable functions in SQL, Python, or Java that encapsulate logic and make your dbt models cleaner.
Why it's useful:
Great for repetitive logic like customer segmentation, flagging anomalies, or standardizing formats.
Example:
create or replace function classify_customer(spend double)
returns string
as $$
case
when spend > 1000 then 'High Value'
when spend > 500 then 'Medium Value'
else 'Low Value'
end
$$;
-- Usage in dbt model
select
customer_id,
classify_customer(total_spend) as customer_tier
from {{ ref('fct_orders') }}
9. Snowpark
What it is:
Snowpark lets you use Python, Java, or Scala to query and process data in Snowflake using a DataFrame API. All computation happens in the warehouse.
Why it's useful:
You can write dbt models in Python using dbt-snowpark
. Great for advanced cleansing, ML scoring, or anything awkward in pure SQL.
Example:
# models/stg_customers_python.py
import snowflake.snowpark.functions as F
def model(dbt, session):
dbt.config(materialized="table")
customer_df = dbt.ref("raw_customers")
return customer_df.with_column(
"full_name",
F.concat(F.col("first_name"), F.lit(" "), F.col("last_name"))
)
When to Use What
If you need to... | Then use... |
Recover from accidental data deletion | Time Travel |
Test changes on real data safely | Zero-Copy Cloning |
Enforce role-based data access | Row Access / Column Masking |
Track costs or classify sensitive data | Tags |
Speed up expensive queries | Materialized Views |
Trigger updates when data changes | Streams & Tasks |
Reuse complex business logic | UDFs |
Use Python for transformation | Snowpark |
Final Thoughts
Snowflake isn't just a place where your SQL runs—it's a modern data platform with native features that can dramatically improve how you work.
You don't need to be a full-time admin to clone schemas for testing, restore dropped tables, or tag your resources for cost monitoring. By understanding and applying these powerful features in your dbt projects, you can build data products that are not only faster and more reliable but also more secure and cost-efficient.
Subscribe to my newsletter
Read articles from Sriram Krishnan directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
