Helper Tokens
Use helper tokens when creating Macros or writing transformations.
Given a staging node using the fully qualified database, "SNOWFLAKE_SAMPLE_DATA"
, schema "TPCH_SF10".
, and table CUSTOMERS
.
SRC
Resolves to the current source.
Syntax
{{SRC}}
Example
"CUSTOMER"."C_PHONE"
SRC_COL
Resolves to source column name of the column. This can be helpful if you column names have been changed. For example the column name is Customer_Number
, but the source is C_PHONE
.
Syntax
{{SRC_COL}}
Example
"C_PHONE"
SRC_NODE
Resolves to source node name of the column.
Syntax
{{SRC_NODE}}
Example
"CUSTOMER"
TGT
Resolves to current fully qualified node and column.
Syntax
{{TGT}}
Example
"STG_CUSTOMER_Macro"."C_PHONE"
TGT_COL
Resolves to current column.If the column name is different from the source it will resolve to the current name. For example, the source name is C_PHONE
, but the current name is CUSTOMER_PHONE
. It will resolve to CUSTOMER_PHONE
.
Syntax
{{TGT_COL}}
Example
"CUSTOMER_PHONE"
TGT_NODE
Resolves to current node.
Syntax
{{TGT_NODE}}
Example
"STG_CUSTOMER_Macro"