Materialization behavior
Understand how Vulcan model kinds map to native Snowflake operations.
With a validated gateway from Connect to Snowflake, this is the build stage: choose a model kind and know exactly what Snowflake operation it produces before you run it. SQL models compile to native Snowflake SQL. Each model kind maps to a Snowflake operation.
Materialization behavior per model kind
FULL
CREATE OR REPLACE TABLE
Rebuilds the table from scratch each run.
SEED
Loads a file-backed reference dataset, commonly CSV.
Use for small reference tables.
VIEW
CREATE OR REPLACE VIEW
Always fully rewrites. It has no partition or key tracking.
INCREMENTAL_BY_TIME_RANGE
DELETE by time range, then INSERT
Deletes and refreshes the target window. Re-runs are safe.
INCREMENTAL_BY_UNIQUE_KEY
MERGE on the unique key
Updates existing rows or inserts new rows.
INCREMENTAL_BY_PARTITION
DELETE by partitioning key, then INSERT
Maintains partition-level consistency during reprocessing.
MANAGED
CREATE OR REPLACE DYNAMIC TABLE
Requires Enterprise edition or higher.
SCD Type 2
MERGE implementing SCD Type 2
Maintains historical versions of records when tracked data changes.
SCD_TYPE_2_BY_COLUMN
MERGE
Tracks historical changes based on column-level changes.
SCD_TYPE_2_BY_TIME
MERGE
Tracks historical changes based on time-based changes.
Python (Snowpark) models
Python models run through Snowpark. Declare the model kind with @model(...). Return a Snowpark DataFrame from the model body.
def execute(context, start, end, execution_time, **kwargs):
from snowflake.snowpark.functions import col, lit, when
df = context.snowpark.table(
context.resolve_table('"SNOWFLAKE_SAMPLE_DATA"."TPCH_SF1"."CUSTOMER"')
)
return df.select(col("C_CUSTKEY"), col("C_NAME"))Default to SQL. Use Snowpark for Python libraries or complex DataFrame operations.
Semantic models, metrics, and identifier casing
Snowflake stores unquoted identifiers in UPPERCASE. Use UPPERCASE in dimensions, measures, filters, joins, DQ SQL, and metric expressions. Lowercase causes object does not exist.
COUNT(DISTINCT …) runs exactly on Snowflake. Cross-join-shaped semantic queries can run 30 times slower. Model joins explicitly and pre-aggregate a mart when needed.
Lifecycle DDL
Guard raw DDL and DML in pre_statements, post_statements, after_all, and before_all. By default, vulcan plan executes these blocks.
Refer to Vulcan Models for more details.
Macro rules
Macro column arguments are expression objects, not strings. Do not annotate them as : str. Render them with .sql(dialect=evaluator.dialect). Keep an empty macros/__init__.py file so Vulcan discovers the folder.
Refer to Vulcan- Macros for more details.
Cross-database external models
vulcan create_external_models only inspects the gateway database. Declare cross-database sources manually with triple-quoted identifiers.
The triple quote preserves Snowflake’s case-sensitive UPPERCASE identifier. Without it, the linter reports Table not found.
Next step
Return to Endpoints to select a consumption interface.
Last updated
Was this helpful?