When you define a target for a Data Refinery flow that uses a connection, you can define how you want data to be written by using the options provided by the connector.
You can view a table of the individual data source properties at Data > Connectivity. Expand Connection resources, and select Connection properties.
For example, for IBM Db2, you can set the following target options in Data Refinery:
In the Data Refinery target properties, you can see these options in the Write mode and Table action fields.
Write mode
The write mode defines how records are written to the target table.
- Insert
This mode inserts rows in the target table. The target table must have the same column types as the data being inserted or it must be compatible with these column types.
- Merge
This mode merges rows by using the target table primary key. If you provide a key column in the target properties of the Data Refinery flow, and there are no rows that match this key column value, then the connector inserts the data. Otherwise the data is updated.
- Update
This mode updates rows based on the key column names or the primary key defined on the target table.
See also Known issue for the Update option.
Key column names
If you provide the key column names as a comma-separated list of column names, this list overrides the primary key used during an update or merge.
Table action
The table action defines how the target table handles the new data set.
- Append
This action writes rows into the table
- Replace
This action removes the target table, if it exists, and recreates the target table with the resulting schema from the output of the Data Refinery flow.
- Truncate
This action deletes all the existing rows in the target table.