Database Export Merge Options

This dialog enables you to map fields from the source data onto columns in the target database table. Where a source data field is mapped to a database column, the column value is replaced with the source data value when the stream is run. Unmapped source fields are left unchanged in the database.

Map Fields. This is where you specify the mapping between source data fields and database columns. Source data fields with the same name as columns in the database are mapped automatically.

  • Map. Maps a source data field selected in the field list on the left of the button to a database column selected in the list on the right. You can map more than one field at a time, but the number of entries selected in both lists must be the same.
  • Unmap. Removes the mapping for one or more selected database columns. This button is activated when you select a field or database column in the table on the right of the dialog.
  • Add. Adds one or more source data fields selected in the field list on the left of the button to the list on the right ready for mapping. This button is activated when you select a field in the list on the left and no field with that name exists in the list on the right. Clicking this button maps the selected field to a new database column with the same name. The word <NEW> is displayed after the database column name to indicate that this is a new field.

Merge Rows. You use a key field, such as Transaction ID, to merge records with the same value in the key field. This is equivalent to a database "equi-join." Key values must be those of primary keys; that is, they must be unique, and cannot contain null values.

  • Possible keys. Lists all fields found in all input data sources. Select one or more fields from this list and use the arrow button to add them as key fields for merging records. Any map field with a corresponding mapped database column is available as a key, except that fields added as new database columns (shown with <NEW> after the name) are not available.
  • Keys for merge. Lists all fields used to merge records from all input data sources based on values of the key fields. To remove a key from the list, select one and use the arrow button to return it to the Possible Keys list. When more than one key field is selected, the option below is enabled.
  • Only include records which exist in database. Performs a partial join; if the record is in the database and the stream, the mapped fields will be updated.
  • Add records to database. Performs an outer join; all records in the stream will be merged (if the same record exists in the database) or added (if the record does not yet exist in the database).

To map a source data field to a new database column

  1. Click the source field name in the list on the left, under Map Fields.
  2. Click the Add button to complete the mapping.

To map a source data field to an existing database column

  1. Click the source field name in the list on the left, under Map Fields.
  2. Click the column name under Database Column on the right.
  3. Click the Map button to complete the mapping.

To remove a mapping

  1. In the list on the right, under Field, click the name of the field for which you want to remove the mapping.
  2. Click the Unmap button.

To deselect a field in any of the lists

Hold down the CTRL key and click the field name.