Perform the following tasks to develop and run a dynamic mapping to read or write to JDBC V2. 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 JDBC V2 mapping and add the JDBC V2 objects.
Configure a JDBC V2 dynamic source for the Read or Lookup transformation to get metadata changes from the JDBC V2 source at run time. Select the JDBC V2 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 JDBC V2 dynamic target. Select the JDBC V2 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.