Configure a mapping task for a mapping with a MySQL CDC source. When you run the mapping task, the MySQL change records are transmitted to the target. You cannot run mappings for MySQL CDC.
Note: SQL ELT optimization and Visio templates are not supported for MySQL CDC mapping tasks.
To begin configuring a mapping task, perform one of the following actions:
•In Data Integration, click New > Mapping Task and then click Create.
•While the mapping is open, select New Mapping Task from the Actions menu.
Then enter information on some or all of the following pages in the mapping task wizard:
•General Properties. Enter a name for the mapping task, a project or folder location for the mapping task, and the runtime environment that contains the Secure Agent or Secure Agent Group under which the mapping task will run. If you began creating the mapping task without first opening the mapping, you must also select the mapping with which to associate the mapping task. The description is optional.
•Sources. This page appears only if you defined a parameter for the source connection or object in the mapping. If you defined a connection parameter, select or create the specific connection that you want the mapping task to use. If you defined a source object parameter, select the extraction map for a specific source object. For more information, see Properties for parameterized sources and connections.
•CDC Runtime. This page appears only for CDC sources. Enter CDC-related properties that are used when the mapping task runs. From this page, you can reset the point in the PowerExchange Logger for Linux, UNIX, and Windows logs from which the PWX CDC Reader starts extracting change data. For more information, see CDC runtime properties in mapping tasks and Configuring a restart point for change data extraction.
•Targets. This page appears only if you defined a parameter for the target connection or object in the mapping. For more information about configuring targets in mapping tasks, click the help icon on this page.
•Runtime Options. From this page you can optionally define a schedule for running the mapping tasks, email notifications, advanced options, parameter file location, SQL ELT optimization, execution mode, and advanced session properties. For more information, see Advanced session properties in mapping tasks.
Properties for parameterized sources and connections
The Sources page appears in the mapping task wizard if you defined a parameter for the MySQL source connection or 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 MySQL 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 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 ServicesData 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:
- End of log. The latest change record in the Logger logs.
- Earliest available. The oldest available change record in the Logger logs.
- Timestamp. The logged change record associated with a timestamp you set. To set a timestamp, select a date from the date picker. Then enter the time in HH:MM:SS.s format in the adjacent list boxes, where s represents fractional seconds.
- PWX Token. The PowerExchange restart token that was automatically generated during change data capture. To obtain the restart token, use one of the following methods:
▪ Run a CAPX row test on the extraction map in PowerExchange Navigator. In the row test results window, select Show Auto Generated Columns to see the generated DTL__ columns. Take the value from the DTL__CAPXRESTART1 field and add eight zeroes at the end. Enter the edited value in the PWX Token field. For more information about running a CAPX row test, see the PowerExchange Navigator User Guide.
▪ Run the PWXUCDCT utility with the REPORT_CDCT command. The report output shows the restart token for each PowerExchange Logger log file. For more information about the PWXUCDCT utility, see the PowerExchange Utilities Guide.
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:
•$Source Connection Value
•$Target Connection Value
•Incremental Aggregation
•Reinitialize Aggregate Cache
•SQL ELT Optimization options
•Session Sort Order
•Cache LOOKUP() Function
•Pre-build Lookup Cache
•On Stored Procedure Error
•Data Column Delimiter
•Enable cross-schema SQL ELT optimization (Clear this check box.)
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.