Skip to main content
Skip table of contents

target_entity_transformation_by_{attribute_type}

Provides the target entity attribute transformation for the desired attribute type


See also:


Usage

VARIABLE
<target_entity_transformation_by_dv_hashkey>

Notes

Supported in all loads.


Examples

Variable used in an OVERRIDE load step

Given mapping:

Target entity: publish.D_RATECODE

Source entity: src.SOURCE

source attributes

Formula

Target attribute

attribute_A,attribute_B,attribute_C

HASH

key_id

RUN_ID

run_id

attribute_D

information

OVERRIDE load step in D_RATECODE entity:

SQL
insert into <target_schema>.<target_entity_name>
select <target_entity_transformation_by_dv_hashkey>
from <source_entity_schema>.<source_entity_name>;

Load executed in the target database Snowflake:

CODE
insert into publish.D_RATECODE
select MD5(UPPER(NVL(attribute_A, '-1') || '~' || NVL(attribute_B, '-1')|| '~' || NVL(attribute_C, '-1')))
from src.SOURCE;

Load executed in the target database BigQuery:

CODE
insert into publish.D_RATECODE
select TO_HEX(MD5(UPPER(CONCAT(COALESCE(CAST(attribute_A AS STRING), '-1'),'~',COALESCE(CAST(attribute_B AS STRING), '-1'),'~',COALESCE(CAST(attribute_C AS STRING), '-1')))
from src.SOURCE;

Load executed in the target database Databricks:

CODE
insert into publish.D_RATECODE
select MD5(UPPER(COALESCE(CAST(attribute_A AS STRING), '-1') || '~' || COALESCE(CAST(attribute_B AS STRING), '-1')|| '~' || COALESCE(CAST(attribute_C AS STRING), '-1')))
from src.SOURCE;

Load executed in the target database Microsoft Fabric, Azure SQL Database, Azure Synapse SQL:

CODE
insert into [publish].[D_RATECODE]
select CONVERT(VARCHAR(32),HASHBYTES('MD5', UPPER(TRIM(COALESCE([attribute_A], '-1'))  + '~' + TRIM(COALESCE([attribute_B], '-1')) + '~' + TRIM(COALESCE([attribute_C], '-1')))),2)
from [src].[SOURCE];

Load executed in the target database Redshift:

CODE
insert into publish.D_RATECODE
select MD5(UPPER(NVL(attribute_A, '-1') || '~' || NVL(attribute_B, '-1')|| '~' || NVL(attribute_C, '-1')))
from src.SOURCE;

 

JavaScript errors detected

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

If this problem persists, please contact our support.