Db2 for z/OS CDC Connector > Mappings and mapping tasks with Db2 for z/OS CDC Connector > Mapping task configuration
  

Mapping task configuration

Configure a mapping task for a mapping with a Db2 for z/OS CDC source. When you run the mapping task, the Db2 change records are transmitted to the target. You cannot run mappings for Db2 for z/OS CDC.
Note: SQL ELT optimization and Visio templates are not supported for Db2 for z/OS CDC mapping tasks.
To begin configuring a mapping task, perform one of the following actions:
Then enter information on some or all of the following pages in the mapping task wizard:

Properties for parameterized sources and connections

The Sources page appears in the mapping task wizard if you defined a parameter for the connection or source object in the associated mapping.
If you defined a parameter for the source connection in the mapping, you must select or create a specific CDC connection for the mapping task. Ensure that the connection type is consistent with the source object type. After a connection is selected, you can click Advanced Options to configure the optional Filter Overrides or SQL Query Override advanced property. For more information about these advanced properties, see Db2 for z/OS CDC source properties in mappings.
Note: If the mapping uses a specific source connection and a parameter for the source object, you can specify these advanced properties in the mapping and also specify them in the mapping task. In this case, the properties in the mapping task override those in the mapping.
If you defined a parameter for the source object in the mapping, you must select a specific source object for the mapping task. After you select a source object, the Preview All Columns button appears under Data Preview. However, you cannot preview data for a CDC source object.
When you finish entering information on the Sources page, click Validate to validate your entries and then click Next to proceed to the CDC Runtime page.
Note: If the mapping specifies a connection parameter and you edit the mapping to change the source object, check the specific connection in the mapping task to determine if you need to reset it and then Validate the mapping task again.

CDC runtime properties in mapping tasks

When you create or edit a mapping task that processes change data from a CDC source, you can set optional properties on the CDC Runtime page. These properties are used when the mapping task runs.
The following table describes the optional CDC runtime properties:
Property
Description
Maximum Rows Per Commit
Maximum number of change records in a UOW that the mapping task can process. When this maximum is reached, the UOW change records are committed on the target.
Valid values are 0 through 999999999. Default is 0, which causes this property to be ignored.
Minimum Rows Per Commit
Minimum number of change records that must exist in a UOW before the PWX CDC Reader can request a real-time flush of the change records to the target.
Valid values are 0 through 999999999. Default is 0, which causes this property to be ignored.
Maximum Latency in Seconds
Maximum number of seconds that the PWX CDC Reader waits for more change records before flushing change data from partially filled or empty blocks and returning control to Data Integration.
Valid values are 2 through 360. Default is 2.
Real-time Flush Latency in Milliseconds
Number of milliseconds that must elapse before the PWX CDC Reader requests a real-time flush of uncommitted data in the change data stream to the targets defined in the mapping.
Valid values are -1 through 999999999. Default is 2000.
Note: To control commit processing, you can also use the UOW Count, Maximum Rows Per Commit, and Minimum Rows Per Commit properties.
Restart Point
Displays the restart point in read-only mode. The restart point indicates the position in the change data stream from which the PWX CDC Reader will start reading change records for a source table.
Usually, you set the restart point before running the mapping task the first time to coincide with the time when the target table was materialized. You might also need to set the restart point to reprocess change records or to perform some testing.
To set the restart point, click Select. If you do not specify a restart point, the mapping task starts or restarts from the end of log by default.
Restart Revision
Displays the restart-point revision number in read-only mode. When you navigate to the CDC Runtime page, open the Select Restart Point dialog box, and click OK, the revision number is incremented by 1, regardless of whether you changed the restart point.
Note: During a single mapping-task edit session, the revision number is incremented by 1 only once, even if you return to the Select Restart Point dialog box multiple times.
When a new revision is created, the CDC Connector ignores the restart information in the PM_REC_STATE recovery table and uses the specified restart point the next time you run the mapping task.
Note: If you run the mapping task and then change to a different source object, you must either increment the restart revision number or create a new mapping task.
Initial value is 0.
UOW Count
Number of units of work (UOWs) in the change data stream that the PWX CDC Reader processes before it requests a real-time flush of change records to the targets in the mapping.
Valid values are -1 through 999999999. The values -1 and 0 cause this property to be ignored. Default is -1.
Update as Delete and Insert
Controls whether each SQL update that is captured from a source table is processed as an update or as a delete followed by an insert. You can select this property to handle changes to primary keys in source tables, in which case the insert record contains the key changes. Otherwise, leave this property cleared for normal processing of inserts, updates, and deletes.
By default, this check box is not selected, which causes updates to be processed as update operations.
Continuous Extraction
Controls whether the mapping task runs continuously to capture change data from the source. Selecting this property indicates that the mapping task runs until it is stopped in the Monitor.
By default, this check box is not selected and the mapping task stops after a single execution.
Note: You can also use the Informatica Intelligent Cloud Services Data Integration REST API to view and update CDC runtime options. The mttask API resource lets you retrieve or update mapping task options. For example, you might use mttask to change a selected option in multiple mapping tasks by using the API endpoint provided for the connector. For more information, see the REST API Reference.

Configuring a restart point for change data extraction

When you create or edit a mapping task, you can specify a restart point. The restart point indicates the point in the PowerExchange Logger log files from which the PWX CDC Reader starts extracting change records that were captured from a CDC source table. By default, the restart point is the end of log for the first run. Thereafter, the mapping task restarts from where it last left off by default, unless you specify a restart point.
Usually, you set the restart point before you start the mapping task the first time to coincide with the time at which the mapped target was materialized with data. However, you might need to set the restart point at other times, such as when you need to reprocess change records or perform tests.
    1On the CDC Runtime page, click Select next to the Restart Point property.
    The Select Restart Point dialog box appears.
    2To set a restart point, select one of the following options:
    3Click OK.
    On the CDC Runtime page, the Restart Point property displays the new restart point in read-only mode and the Restart Revision value is incremented by 1.
    Warning: Data Integration performs an implicit cold start when the revision number is incremented through the Select Restart Point dialog box that appears when you click Select for the Restart Point on the CDC Runtime page of the mapping task. The revision number is incremented even if you did not change the option. In this case, the mapping task does not start from the end of log position of the previous run and might read duplicate records or skip records. Ensure that this result is acceptable.

Advanced session properties in mapping tasks

When you create or edit a mapping task that processes change records from a PowerExchange CDC source, set some advanced session properties that pertain to CDC.
In the Advanced Session Properties section on the Runtime Options page, click + to add each advanced session property. The following table describes the advanced session property values to add:
Advanced Property
Required Value
Commit on End of File
No
This setting avoids duplicate data from occurring on the target after a mapping task job is restarted. The default is No.
Recovery Strategy
Resume from last checkpoint
This setting is the only valid value. It is required to enable the recovery of change data and CDC restart information on the target after a mapping task ends abnormally or is stopped before completing change data processing. With this setting, the mapping task can resume processing change data from the point of interruption in the change data stream.
By default, recovery is disabled and the task status remains as Failed. If the task is included in a taskflow, the taskflow continues to run.
For information about other advanced session properties, see the topic "Advanced Session Properties" under Tasks > Data Integration Tasks in the Informatica Cloud Data Integration Help. The following advanced session properties are not supported or required for CDC:
Note: If you want to run a CDC mapping with restart capability, make sure that the Allow the mapping task to be executed simultaneously check box is cleared.