Snowflake - Placeholder values
Applies to
Platform: Snowflake
The placeholder values of a Snowflake project name the database, schema and warehouse of each layer, of the source systems and of the load control. Enter them in replacement_config.json before you run replace_placeholders.ps1. Afterwards the deployment scripts contain your database, schema and warehouse names.
The replacement itself is described in Replace the placeholders in the artifacts.
Variable names
Each variable name has the form <project>#<group>#<variable>: the Project Identifier in lower case without spaces, then a layer or source system in lower case without spaces, for example rawvault for Raw Vault. The load control variables use loadcontrol#loadcontrol#<variable>.
Variables
Layers and source systems
database_name: the database. It must exist.schema_name: the schema.default_warehouse_name: the warehouse of the tasks that run the loaders of this layer.
A source system has the same three variables for its source tables.
Stage Files
Each Parquet source system of a Stage Files project names the external stage and the file format of its loaders:
snowflake_stage_database_name,snowflake_stage_schema_nameandsnowflake_stage_name: the external stage.snowflake_file_format_database_name,snowflake_file_format_schema_nameandsnowflake_file_format_name: the file format.
Load control
database_nameandschema_name: where the tasks are created.schema_nameis prefilled withLCin every project.Deploying a project with Generate Drop Load Control Schema selected drops the load control schema with the tasks of every project in it. Give each project its own load control schema.
warehouse_name: the warehouse of the root and end tasks.load_interval: the schedule of the root task, prefilled with'5 minute', including the single quotes.suspend_task_after_num_failures: the number of failed runs after which Snowflake suspends the root task, prefilled with1.application_nameandapplication_environment_name: written into the task log events.application_environment_nameis prefilled withDEV.
Other groups
<project>#warehouse_name#<value name>: one variable per value of the dataflow property Warehouse Placeholder Variable Name, in lower case. The tasks of these dataflows run in this warehouse instead ofdefault_warehouse_name.governance#tags#database_nameandgovernance#tags#schema_name: with Apply Sensitivity Level Tags, where the tagSENSITIVITY_LEVELis created.
Example
A Data Vault and Mart project with the Project Identifier dwh_project deploys its Stage layer to the example database DWH with the schema SA and the warehouse COMPUTE_WH:
{ "name": "dwh_project#stage#database_name",
"value": "DWH", "secretname": "" },
{ "name": "dwh_project#stage#schema_name",
"value": "SA", "secretname": "" },
{ "name": "dwh_project#stage#default_warehouse_name",
"value": "COMPUTE_WH", "secretname": "" }
The Stage tables are then created as DWH.SA.STG_ST_<object>.
Example files of Generator 2.0, with the same variables as in Generator 2.4:
- Stage Files
- Data Store
- Dimensional and Mart, similar for Stage, Dimensional and Data Mart
- Data Vault and Mart, similar for Data Vault
Related articles
- Previous: Snowflake - Target environment, Download generated artifacts
- Next: Snowflake - Deployment
- Reference: Snowflake Stage Files, Apply Sensitivity Level Tags (Project), Warehouse Placeholder Variable Name (Dataflow)
- See also: Replace the placeholders in the artifacts, Snowflake - Artifacts, Snowflake - Load data - Linked projects