Skip to main content
Skip table of contents

target_entity_attribute_list_with_transform_cast_exttable_parquet

Target database: Snowflake

Resolves as full target entity attribute list having the transformations based on the first SOURCE entity mapping. One-to-one mappings without transformation formula will be translated as single-level parquet column references with datatype for external table creation context.


See also:


Usage

VARIABLE
<target_entity_attribute_list_with_transform_cast_exttable_parquet>

Notes

Supported in all loads.


Examples

Variable used in an OVERRIDE load step

Given mapping:

Target entity: publish.F_RATECODE

Source entity: src.SOURCE

source attributes

Formula

Target attribute

attribute_a

attribute_a

attribute_b

attribute_b

attribute_c

attribute_c

Environment variable: <your_stage> as RATECODE_STAGE

PRE load step in F_RATECODE entity:

SQL
CREATE OR REPLACE EXTERNAL TABLE <target_schema>.<target_entity_name>_EXT
    ( <target_entity_attribute_list_with_transform_cast_exttable_parquet> )
  WITH LOCATION = @<your_stage>
  REFRESH_ON_CREATE =  TRUE
  FILE_FORMAT=(TYPE=PARQUET);

Load executed in the target database Snowflake:

SQL
CREATE OR REPLACE EXTERNAL TABLE publish.F_RATECODE_EXT
    ( attribute_a TEXT AS (CAST(GET($1, 'attribute_a') AS TEXT))
    , attribute_b TEXT AS (CAST(GET($1, 'attribute_b') AS TEXT))
    , attribute_c TEXT AS (CAST(GET($1, 'attribute_c') AS TEXT)) )
  WITH LOCATION = @RATECODE_STAGE
  REFRESH_ON_CREATE =  TRUE
  FILE_FORMAT=(TYPE=PARQUET);

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.