Tasks
Version 24.2.9064
Version 24.2.9064
Tasks
Tasks control the data flow from a source into a destination table. In a standard replicate job, all source tables and views are available to be added as replicate tasks to the job.
To add tasks to a job:
-
Select your job and click the Task tab.
-
Click Add Tasks.
-
Select the task or tasks that you want to add to your job from the table of tasks. You also can enter the name of a task in the Search field to locate a specific task.
Note: To include all tasks, select the checkbox next to the job source and destination at the top of the table.
-
Click Add Tasks to add the tasks to your job.
CData Sync automatically builds the replicate tasks and saves your job.
If you selected the Sync All option as the replication type for your job, all available tables and views are added automatically as replicate tasks to the job. Each time the job executes, Sync first searches for any new tables or views in your source and appends additional replicate tasks to your job so that they are included in the run.
If you want to exclude certain tasks from the job, select the tasks on the Task tab and click Exclude. When you do this, future job executions ignore those tables.
Task Settings
You can configure each task in your job individually by clicking a row on the Task tab. This action opens the task’s properties page where you can adjust the task settings that are described in the following sections.
Source Information
The Source Information category provides an overview of the source table’s capabilities and key features:
-
Key/Index Column: Specifies the column or columns that make up the primary key index for the table.
-
Incremental Check Column: Specifies the column that is used by CData Sync to identify new or modified records during subsequent replication intervals. See Incremental Check Column for more information.
-
Captures Deletes: Specifies whether Sync can detect when data has been deleted in the source. See Deletion Captures for more information.
Destination Information
The Destination Information category gives you full control over where to land your source data.
This category provides an overview of the following options:
-
Schema Name: The schema name is inherited from the Destination Schema advanced job option. For destinations that support multiple schemas, select from a list of available schemas in your database.
-
Table Name: By default, Sync creates a new table with the same name as the source table in the target destination where you want to replicate the data. You can rename that table by clicking the edit icon in the Destination Information category and then renaming the table in the Table Name field of the Destination Information dialog box.
Column Mapping
The Columns tab gives you more control over which data to retrieve from your source table and how you want that data to be represented in the target table. See Mapping Columns for information about how to remove or adjust column mappings and apply different transformations to each task.
Replication Options
Replication options control the flow from your source application to your target destination. While you can set replication options in your job that affect the job as a whole, replication options that you set in the query only affect that specific query. By default, each replication option that you set in the job is inherited by each query, and any replication option that you set in the query overrides those values.
Write Custom Queries
The task settings on the Overview tab automatically update the REPLICATE query as you make changes in the dialog boxes. In addition, you can click the Query tab to edit the generated query manually. See Custom Querying: REPLICATE Command for REPLICATE command syntax; see Custom Querying: CHECKCACHE Command for CHECKCACHE command syntax. Each of these pages contain common examples, as well.
Load From Folder
If the Load from Folder option is selected, you need to configure a single LoadFolder task that continuously replicates files from a directory or bucket into a single destination table.
When Sync runs the job, it compares the last modified date of each file in source folder to the value stored in the destination table. To help facilitate this task, Sync adds these required system columns to your destination table:
Column Name | Data Type | Primary Key |
---|---|---|
_filename | Varchar | Yes |
_line | Integer | Yes |
_lastModified | BigInt | Yes if Modified Action = APPEND |
To adjust the settings for the LoadFolder tasks, click Task Settings to open the task settings:
-
Modified Action: Specifies whether to append or upsert data in your destination table. When a previously replicated file is modified, the APPEND action appends all rows while the UPSERT action replaces any existing records.
-
File Mask: Specifies a pattern to match file names within the folder.
-
Schema Name: Specifies a particular schema name or names. For destinations that support multiple schemas, you can select from a list of available schemas in your database.
-
Table Name: Specifies the table name. By default, Sync creates a new table with the same name as the job name in the target destination where you want to replicate the data. You can rename that table by clicking Create New Table.
After you create a LoadFolder task, you can choose a sample file from which to build the column mapping from the Column-Mapping tab in the Task Settings dialog box. See Mapping Columns for more information about how to edit the mappings and apply different transformations to the task.