Skip to content
  • There are no suggestions because the search field is empty.

Warehouse Placeholder Variable Name (Dataflow)

Applies to
Platform: Snowflake

Warehouse Placeholder Variable Name (WarehousePlaceholderVariableName) lets the task that runs the loader of one dataflow use its own Snowflake warehouse. Set it on a dataflow whose load needs another warehouse than the rest of its layer.

Only the native Snowflake generator configurations offer the property; Snowflake dbt does not.

Where to set it

The property is set per dataflow. It is offered on the dataflows of every model object type except Source, Hierarchy Flatten and Mart Hierarchy Flatten.

  1. Open Manage Term Mappings of the model object.
  2. Open the menu of the dataflow and choose Edit, see Edit a Dataflow.
  3. In the Edit Dataflow panel, enter the value in Warehouse Placeholder Variable Name under Technology and save.

Values and default

  • Empty (default): the task runs in the warehouse of the layer, <project>#<layer>#default_warehouse_name.
  • A name, for example heavy_loads: the generator adds the placeholder variable <project>#warehouse_name#<value>, with the value in lower case. Dataflows with the same value share the variable.

<project> is the Project Identifier in lower case without spaces, and <layer> the layer of the model object, for example rawvault.

Effect on generated output

  • replacement_config.json lists the new variable. You enter the name of an existing warehouse there when you replace the placeholders, see Snowflake - Placeholder values.
  • Depending Tasks and Near-Realtime Tasks: the task of the loader gets WAREHOUSE = {<project>#warehouse_name#<value>}.
  • Airflow: the operator of the loader gets warehouse='{<project>#warehouse_name#<value>}'.
  • Stage-Driven Tasks: the task of a Stage model object calls all dependent loaders in one warehouse. With a value on the dataflow of the Stage, the task gets WAREHOUSE = {<project>#warehouse_name#<value>}; without it, the task runs in the warehouse of the Stage layer. Values on the dataflows of the dependent model objects have no effect on these tasks.

Example

The dataflow of a Satellite BRANCH has the value heavy_loads. With the LoadControl Option Depending Tasks, the task of the Satellite starts like this:

CREATE OR REPLACE TASK LC_RDV_SAT_BRANCH_TASK
    WAREHOUSE = {<project>#warehouse_name#heavy_loads}
AS
...

Without the value, the same task has WAREHOUSE = {<project>#rawvault#default_warehouse_name}. replacement_config.json lists <project>#warehouse_name#heavy_loads with an empty value. Enter a warehouse there, for example LOAD_WH_L.

Related articles