Snowflake Data Cloud Connector > Part III: SQL ELT with Snowflake Data Cloud Connector > SQL ELT optimization for mapping tasks > Transformations with Snowflake Data Cloud
  

Transformations with Snowflake Data Cloud

When you configure SQL ELT optimization, Data Integration tries to push the configured transformation to Snowflake.
You can use full SQL ELT to push the following transformations to Snowflake:
Note: Router transformation is applicable only for source SQL ELT.
For more information about configuring transformations, see Transformations in the Data Integration documentation.

Aggregator transformation

You can configure full SQL ELT optimization to push an Aggregator transformation to process in Snowflake.

Aggregate calculations

You can perform the following aggregate calculations:

Incoming ports

When you configure an Aggregator transformation and the incoming port is not used in an aggregate function or in a group by field in mappings, the ANY_VALUE() function is used for columns that are not part of the group by or the aggregator function. In this case, the output is not deterministic as the ANY_VALUE() function returns any value from the port.

Expression transformation

You can configure full SQL ELT optimization to push an Expression transformation to process in Snowflake.
You can add an Expression transformation to each of the sources in the mapping, followed by a join downstream in the mapping. Additionally, you can add multiple Expression transformations that branch out from a transformation and then branch in into a transformation downstream in the mapping.
When you configure an Expression transformation, consider the following rules to include variables in the expression:

Lookup transformation

You can configure full SQL ELT optimization to push a Lookup transformation to process in Snowflake. You can push both a connected and an unconnected lookup.
When the mapping contains an unconnected lookup, you can also nest the unconnected lookup function with other expression functions. For example, :LKP.U_LOOKUP(Upper(argument1), argument)

Lookup objects

Consider the following rules when you configure lookups:

Connected lookup

In a mapping with a Snowflake Data Cloud source and target, set the Multiple Matches option for the lookup object to Return all rows.

Unconnected lookup

When you configure an unconnected Lookup transformation, consider the following rules:

Multiple matches behavior in a connected and unconnected lookup

If you enable SQL ELT optimization for a mapping that contains a connected or unconnected lookup, you must follow these guidelines:

FileName port

When you configure a lookup for an Amazon S3 source in a mapping that contains an Amazon S3 source and Snowflake target, remove the filename port from both the Amazon S3 source and lookup object. The FileName port is not applicable.

Lookup query object

When you use a lookup object as a query in a Lookup transformation in a mapping to lookup data in Snowflake, specify the database and schema in the advanced lookup properties or in the additional JDBC URL parameters in the Snowflake Data Cloud connection.

Normalizer transformation

You can configure a Normalizer transformation in a mapping to return a row for each instance of the multiple-occurring data.
For example, a relational source includes four fields with quarterly sales data. You can configure a Normalizer transformation to generate a separate output row for each quarter.

Router transformation

You can configure source SQL ELT optimization to push a Router transformation to the database for processing.
When you configure a Router transformation, connect or map only one output group to the target transformation.

Sequence Generator transformation

When you configure a Sequence Generator transformation, you can connect the NEXTVAL port to single or multiple ports in the transformations that follow the Sequence Generator transformation.
You can push a Sequence Generator transformation with the following restrictions:

SQL transformation

You can use an SQL transformation only to push certain functions and shared sequence.

Use functions to run queries

You can include functions in an entered query in an SQL transformation and run queries with the Snowflake target endpoint.
You must use only the SELECT clause SQL statement to push a function. Specify the column name in the select query or function. Do not push functions using statements such as "SELECT * FROM TABLE".
You can use the following functions in an entered query:
To use the CURRENT_ROLE, CURRENT_DATABASE, and CURRENT_SCHEMA functions in an SQL transformation, ensure to provide the database, role, and schema name in the additional JDBC parameters field in the Snowflake Data Cloud connection. If you do not specify the values in the connection, Data Integration inserts null to the target.

Reuse shared sequence

You can push a mapping with a shared sequence defined in an SQL transformation to a Snowflake endpoint. Data Integration writes the data in the same sequence to the target as in the Snowflake source.
Get the shared sequence from Snowflake and define the sequence in an entered query in an SQL transformation.
Specify the shared sequence in the entered query in the following syntax: Select <Snowflake_schema_name>.<Snowflake_database_name>.<sequence_name>.NEXTVAL

User defined functions

You can configure a custom query in an SQL transformation to read from Java or SQL user-defined functions (UDF) in Snowflake.
The following guidelines apply for UDFs:

Union transformation

You can push a Union transformation with the following restrictions:

Update Strategy transformation

You cannot use an Update Strategy transformation.
You can instead use the update and upsert operations in the Target transformation to write to Snowflake.