Snowflake Data Vault
Applies to
Platform: Snowflake
Architecture: Data Vault
Snowflake Data Vault generates a Stage, Raw Vault and Business Vault for Snowflake as SnowSQL scripts with stored procedure loaders. Select the Generator Configuration Snowflake Data Vault when you add a project whose Data Vault runs on Snowflake.
For dbt, select Snowflake Dbt Data Vault instead, see Snowflake dbt Data Vault.
Scope and output
- Platform: Snowflake.
- Dataflow Modeling columns: Source; Stage under Bronze; Raw Vault and Business Vault under Silver. See Understand the Layering concept.
- Deployment layers: Stage, Raw Vault and Business Vault.
- Output: the layer scripts
SQL\L010_Stage.sqltoSQL\L030_Business Vault.sql, the task scripts of the load control or an Airflow DAG in the folderLoadControl, anddeploy.ps1withdeploy.sql, described in Snowflake - Artifacts.
Solid arrows are dataflows between the Dataflow Modeling columns of the project; dashed outlines mark columns of linked projects, and dashed arrows are their dataflows:

Prerequisites
- A Snowflake account with the databases of the layers and of the load control, and a warehouse. The deployment creates only the schemas.
- A role that creates the objects, runs tasks and reads the source databases.
- PowerShell 7 and SnowSQL with a named connection.
The setup is described in Snowflake - Target environment, the placeholders in Snowflake - Placeholder values.
Sources and linked projects
Stage source views read each source table as <database>.<schema>.<table>, with placeholders for the database and schema. Discover a Snowflake database creates the source model objects, and Source systems per generator configuration lists the discovery types.
You can import a linked project as a source and export this project as a linked project.
Supported model objects
Source and Stage
Raw Vault
- Hub
- Link
- Satellite
- Link Satellite
- Multi-Active Satellite
- Same As Link
- Hierarchical Link
- Driving Key Link
- Record Tracking Satellite
- Effectivity Satellite
- Record Tracking Link Satellite
- Effectivity Link Satellite
- Non-Historized Link Satellite
- Non-Historized Satellite, since Generator 2.4
- PIT
- Reference Table
- RawVault Composite
- Current View
- History View
Business Vault
- Business Hub
- Business Link
- Business Satellite
- Business Link Satellite
- Same As Business Link
- Hierarchical Business Link
- Business Driving Key Link
- Effectivity Business Satellite
- Record Tracking Business Link Satellite
- Effectivity Business Link Satellite
- Non-Historized Business Link Satellite
- Non-Historized Business Satellite, since Generator 2.4
- Business PIT
- BusinessVault Composite
- Business Current View
- Business History View
- Hierarchy Flatten
- Vault Out, since Generator 2.2
Capabilities and limitations
- Names: generated names are upper case without quotes.
- Loaders: stored procedures
<table name>_LOADERin Snowflake Scripting. Each loads in one transaction and logs its row counts withSYSTEM$LOG_INFO. - Tables: Stage tables are transient by default; vault tables are permanent.
- Keys: Hubs and Links have their hash key as primary key and a unique constraint on the business key terms. Snowflake does not enforce them, see Overview of Constraints.
- Foreign keys: Foreign Key Mode offers
NoneandCreate Disabled(default), notCreate Enforced.Create Disabledcreates the foreign keys asNOT ENFORCEDconstraints. - Indexes: index management is not available.
- Unknown member: Hubs, Links, Satellites and Link Satellites get a row with the hash key
X'00'. Custom Singleton Values sets its values. - Hashing: hash keys and row hashes are
SHA2_BINARY(..., 256)inBINARY(32)columns with the default Hash Algorithm. See How biGENIUS-X builds hash values. - Validity: with Persist Validity on (default), historized tables store
BG_ValidToTimestamp; off, the result view computes it. - Change detection: changes to Satellite terms selected in Excluded from Delta Detection alone create no new version.
- Loading order: Use Embryo Loader on a relationship inserts missing Hub or Link keys before the Satellite loader runs.
- Data quality: data quality rules are available.
- Deployment: with the default Deployment Options, each deployment replaces the tables with empty ones and drops the load control schema. See Snowflake - Deployment.
- Loading: Warehouse Placeholder Variable Name moves the tasks of a dataflow to another warehouse.
- Governance: Apply Sensitivity Level Tags adds a script that creates the tag
SENSITIVITY_LEVEL.
Project properties
The configuration offers these project properties, with their defaults:
- Hash Algorithm:
SHA2-256; alsoHASHandMD5 - Hash Casing:
None; alsoUpperandLower - Hash Concatenation Separator:
_ - Hash Null Placeholder:
_NULL_ - Hash Trim: off
- Begin of Universe:
1900-01-01 - End of Universe:
9999-12-31 - Persist Validity: on
- Create Result Views: on
- Target Object Comment Type:
None; alsoTablesandTables and Views - Artifact Output Mode:
Layer Composites; alsoDeployment Objects - Deployment Options:
Generate Drop Table StatementsandGenerate Drop Load Control Schema - Apply Sensitivity Level Tags: off
- Sensitivity Level Tag Name:
SENSITIVITY_LEVEL - Configure LoadControl: on
- LoadControl Options:
Depending Tasks; alsoStage-Driven Tasks,Near-Realtime TasksandAirflow
Older projects can still show the legacy property Behaviour for Nulled Business Keys in Links, which data quality rules replace.
Data types
Default Term data types by platform lists the data types of the Default Terms on Snowflake.
Platform differences
The table compares the configuration with Microsoft SQL Server Data Vault of the same release:
| Item | Snowflake | Microsoft SQL Server |
|---|---|---|
| Hash Algorithm default | SHA2-256 | SHA1 |
| Persist Validity default | on | off |
| Deployment Options default | both options | Generate Drop Table Statements |
| Enforced foreign keys | not available | available |
| Index management | not available | available |
| Deploy LoadControl | not available | available |
| LoadControl Options | Snowflake tasks, Airflow | Native Load Control, Airflow |
Example
A Hub BDC_CUSTOMER with the business key terms BDC_SHOP_ID and BDC_CUSTOMER_ID generates this table. The excerpt shows the example database DWH and schema RDV in place of the placeholders:
CREATE OR REPLACE TABLE DWH.RDV.RDV_HUB_BDC_CUSTOMER (
BG_LOADTIMESTAMP TIMESTAMP_TZ NOT NULL
,HUB_HK BINARY(32) NOT NULL
,BG_SOURCESYSTEM VARCHAR NULL
,BDC_SHOP_ID VARCHAR NOT NULL
,BDC_CUSTOMER_ID VARCHAR NOT NULL
,CONSTRAINT PK_RDV_HUB_BDC_CUSTOMER PRIMARY KEY (HUB_HK)
,CONSTRAINT UC_RDV_HUB_BDC_CUSTOMER
UNIQUE (BDC_SHOP_ID, BDC_CUSTOMER_ID)
)
;
The deployment then inserts the unknown-member row with HUB_HK X'00' and the value Unknown in both business key columns. The hashing view RDV_HUB_BDC_CUSTOMER_HASHING computes the hash key:
SHA2_BINARY(IFNULL(BDC_SHOP_ID, '_NULL_')
|| '_' || IFNULL(BDC_CUSTOMER_ID, '_NULL_'), 256) AS HUB_HK
Release differences
Project Settings shows the Generator Version of your project.
- Generator 2.2: Vault Out; the project properties Persist Validity, Create Result Views, the four Hash properties and the two Sensitivity Level properties; the model object property Increment Management Type; the relationship property Use Embryo Loader.
- Generator 2.3: the model object property Custom Singleton Values.
- Generator 2.4: Non-Historized Satellite and Non-Historized Business Satellite; the model object property Excluded from Delta Detection; Hash Algorithm defaults to
SHA2-256instead ofHASHand also offersMD5; the hash Default Terms areBINARY(32)instead ofNUMBER(19), see Generators Release - 2.4.0. - Generator 1.10: the project property Delta Detection. Generator 2.0 no longer offers it.
Related articles
- Previous:
- Snowflake: Target environment
- Next: Generate artifacts, Replace the placeholders in the artifacts
- Reference: Foreign Key Mode (Model Object), Custom Singleton Values (Model Object), Excluded from Delta Detection (Model Object), Behaviour for Nulled Business Keys in Links (Project), Hash Algorithm (Project), Artifact Output Mode (Project), Deployment Options (Project), LoadControl Options (Project), Use Stream (Dataflow), Warehouse Placeholder Variable Name (Dataflow), Ignore Downstream Dependencies (Dataflow Model Object)
- Snowflake: Placeholder values
- See also: Available Generator Configurations, Understand the Generator Configuration, Source systems per generator configuration, Microsoft SQL Server Data Vault
- Snowflake: Data Vault and Mart, Data Mart, Stage
- Snowflake dbt: Data Vault, Target environment