Mapping a single multi-member source table on IBM i using standard replication
You can use a wizard to map a multi-member source table to a target table.
Procedure
- Ensure that a CDC Replication Engine for Db2® for i is installed on both source and target.
- Click Configuration > Subscriptions.
- Select a subscription, right-click and select Map Tables.
- Select Custom Table Mapping > Standard and click Next.
- Expand the database, schema, or table from the
Source Tables list to view tables from your database that are available for
mapping. Right-click the database user or schema and click Refresh if you do
not see your table listed.
You may be prompted to filter databases, schemas, or tables if Automatically prompt for filter when expanding nodes is enabled in your preferences. For more information see, Setting advanced preferences. To manually define a filter, select a datastore, database, or schema and click Specify Filter.
- Enable the table to map from the Source Table list. If you do not see your table listed, right-click the database user or schema and select Refresh.
- If you want to hide columns so that the target is not aware of them, select a source table and click Filter Columns. Clear the check box for the column you want to hide and click OK.
- Click Next.
- Expand the database, schema, or table from the Target Tables list to view tables from your database that are available for mapping. Right-click the database user or schema and click Refresh if you do not see your table listed.
- Select a table from the Target Table
list. If you do not see your table listed, select the database user or schema and click
Refresh. Choose one of the following options and click
Next:
- Source and Target Files are Single Member
- Merges all members from the source table to a single-member target table.
- Use Source member Structure on Target
- Maintains the same multi-member structure on the target table as the one on the source table. Each source member is mapped to the corresponding target member.
- Merge Source Members into One Target Member
- Merges all members from the source table to a single member in a multi-member.
- Choose one of the following and click
Next:
- Use an Index
- Select the index (or constraint if you are mapping to target columns on a Netezza® database where the CDC Replication Engine for Netezza Technology has been installed) name from the box or select <Auto Detect> if you want CDC Replication to automatically choose the index or constraint. Use if your target table has an index or a constraint that uniquely identifies a row.
- Use all searchable columns
- Searches all target columns to identify which columns are suitable to uniquely identify rows. The results of the search are used to build a WHERE clause which uniquely identifies the row on the target column to apply data.
- Specify the key
- Select the target columns from the Key Columns list. Use if one or more target columns uniquely identifies a row.
- Choose a replication method from the following and click
Next:
- Mirror (Change Data Capture)—Immediately replicates changes made to the source table to the target table or accumulate source table changes and replicate at a later time. If your configuration requires you to prevent recursive updates when mirroring, enable the Prevent Recursion check box. This check box is only available in components of CDC Replication that support both source and target databases.
- Refresh (Snapshot)—Replicates a snapshot of the source table to the target table.
- Use Relative Record Number—Enables CDC Replication to replicate updates to the target using a
relative record number. When this option is checked, CDC Replication sends the Relative Record Number to the
target and expects the Relative Record Number to be the identifying column on the target side. This
means that the target tables cannot be updated by more than one source table (a target table cannot
be a warehouse for multiple source tables). If you do not check this box, then the CDC Replication Engine for Db2 for
i uses a unique key to replicate to the
target.Notes:
- When this option is checked, if the source table is reorganized, CDC Replication will automatically start a refresh for that table.
- If no Relative Record Number is available on the target table (for example, if the table resides on a non-IBM® i system), you can still make use of this option by mapping the Relative Record Number on the source table to a column in the target table to. For more information, see Source RRN (&CNTRRN).
- This option is only available when you have installed the CDC Replication Engine for Db2 for i on the source database.
- Review the mapping summary.
- Choose one of the following options and click
Finish:
- Define column mappings
- Continues with the column mapping.
- Create a new table mapping
- Allows you to start a new table mapping.
- Return to current view
- Returns you to the current view.