Perform the following tasks to develop and run a dynamic mapping to read or write to Snowflake. The tasks and the order in which you perform the tasks depend on the mapping scenario and the transformations that you plan to use in the mapping.
Create a Snowflake mapping and add the Snowflake objects.
Configure a Snowflake dynamic source for the Read or Lookup transformation to get metadata changes from the Snowflake source at run time. Select the Snowflake source object and perform one of the following tasks based on your requirement:
Use a parameter as a source for a dynamic mapping source object.
Configure data sources for source objects in mappings to get metadata changes at run time. To dynamically get columns from the data source file at run time, select
At run time, get data object columns from the data source
.
Create dynamic ports in transformations and link ports.
Define input rules for dynamic ports to determine which generated ports to create.
Configure a Write transformation to write to a Snowflake dynamic target. Select the Snowflake target object and perform one of the following tasks based on your requirement:
Use a parameter as the data object for the transformation and then change the parameter at run time.
To dynamically get data object columns from the data source at run-time, enable the option
At run time, get data object columns from the data source
.
Define target object columns by mapping flow to enable upstream mapping objects to update the incoming ports for the Write transformation.
To do this, select
Columns defined by: Mapping flow
in the
Ports
tab of the Properties view and then select
Create or replace table at run time
in the
Target Schema Strategy
list.
Create and configure a run-time link to determine which ports to link at run time.