Configure a synchronization task using the synchronization task wizard.
To configure a synchronization task, complete the following steps:
1Complete the prerequisite tasks.
2Create the synchronization task.
3Configure the source.
4Configure the target.
5Optionally, configure data filters.
6Configure field mappings.
7Optionally, configure a schedule and advanced options.
As you work through the task wizard, you can click Save to save your work at any time. When you have completed the wizard, click Finish to save and close the task wizard.
Synchronization prerequisite tasks
Before you create a synchronization task, complete the following prerequisite tasks:
•Create database users.
To write source data to a database target, the database administrator must create a database user account in the target database. Each database user account must have the DELETE, INSERT, SELECT, and UPDATE privileges.
•Verify that the sources and targets meet your requirements.
Defining a synchronization task
1To create a synchronization task, click New > Tasks. Select Synchronization Task and click Create.
To edit a synchronization task, on the Explore page, navigate to the synchronization task. In the row that contains the task, click Actions and select Edit.
2In Synchronization Task Details, configure the following fields:
Field
Description
Task Name
Name of the synchronization task.
Task names can contain alphanumeric characters, spaces, and the following special characters: _ . + -
Maximum length is 100 characters. Task names are not case sensitive.
Location
Project folder in which the task resides.
If the Explore page is currently active and a project or folder is selected, the default location for the asset is the selected project or folder. Otherwise, the default location is the location of the most recently saved asset.
Description
Description of the synchronization task.
Maximum length is 4000 characters.
Task Operation
Select one of the following task operation types:
- Insert
- Update
- Upsert
- Delete
The list of available targets in a subsequent step depend on the operation you select.
3Click Next.
Configuring the source
Select the source for the synchronization task. The steps to configure a source vary based on whether you use a single object or saved query as the source, or you use multiple database tables as the source.
Configuring a single object or saved query as the source
You can configure a single object or saved query as the source of a synchronization task.
1On the Source page, select a connection.
To create a connection, click New. To edit a connection, click View, and in the View Connection dialog box, click Edit.
2To use a single source, select Single.
To use a saved query, select Saved Query.
You can use a saved query when you use a database connection.
3If the connection includes less than 200 objects, select a source object or click Select.
If the connection includes more than 200 objects, click Select.
The Select Source Object dialog box displays up to 200 objects. If the object you want to use does not display, enter a search string to reduce the number of objects that display.
Select an object and click Select.
4To display technical names instead of business names, select Display technical field names instead of labels.
This option is not available for all connection types.
5To display source fields in alphabetical order, click Display source fields in alphabetical order.
By default, fields appear in the order returned by the source system.
6For a flat file or FTP/SFTP single source, click Formatting Options. Select a delimiter and text qualifier. Optionally, select an escape character.
If you choose Other for the delimiter, the delimiter cannot be an alphanumeric character or a double quotation mark.
If you choose a delimiter for an FTP/SFTP flat file, Data Integration applies the delimiter to the local file, not the remote file, when previewing and reading data. If the remote and local files are not synchronized, you might see unexpected results.
7If preview data does not display automatically, click Show Data Preview to preview data.
The Data Preview area shows the first ten rows of the first five columns in the object. It also displays the total number of columns in the object.
The Data Preview area does not display certain Unicode characters correctly. If the data contains binary data, the Data Preview area shows the following text:
BINARY DATA
8To preview all source columns in a file, click Preview All Columns.
The file shows the first ten rows of the source.
9Click Next.
Configuring multiple database tables as the source
You can configure multiple database tables as the source of a synchronization task.
1On the Source page, select a database connection.
To create a connection, click New. To edit a connection, click View and then click Edit.
2Select Multiple.
The Source Objects table displays.
3Click Add.
4In the Select Source Objects dialog box, select the objects you want to use.
The dialog box displays up to 200 objects. If the objects that you want to use do not display, enter a search string to reduce the number of objects that display.
When you select an object, it appears in the Selected Objects list. To remove an object from the Selected Objects list, press Delete.
5Click Select.
The selected sources display in the Source Objects table. To remove a source, in the Actions column, click Remove.
6To display source fields in alphabetical order, select Display source fields in alphabetical order.
By default, source fields appear in the order returned by the source system.
7Create source relationships or create a user-defined join, and click OK.
To create a relationship, perform the following steps:
aSelect a database table and click Create Relationship.
bSelect the source key for the table and then select the related source object and matching object key.
cClick OK.
dMatch the primary key of the source table to the corresponding foreign key of the related database table.
eCreate relationships as necessary to include all sources in the task.
To create a user-defined join to join all database tables, perform the following steps:
aSelect User Defined Join and define the join.
bAny existing relationships are added to the join condition. To ensure that you enter field names correctly, use the Object list and Fields list to add field names to the join statement.
cTo save the user-defined join, click OK.
8To preview source data, select the source in the Source Objects table. If preview data does not appear automatically, click Show Data Preview.
The Data Preview area shows the first ten rows of the first five columns in the source. It also displays the total number of columns in the source.
The Data Preview area does not display certain Unicode characters as expected. If the data contains binary data, the Data Preview area shows the following text:
BINARY DATA
9To preview all source columns in a file, select the source in the Source Objects table and click Preview All Columns.
The file shows the first ten rows of the source.
10Click Next.
Configuring the target
You can configure a single target for a synchronization task. The options that appear on the page depend on the task type and target type that you select for the task.
1On the Target page, enter the following information:
Field
Description
Connection
Select a connection. The list of available connections depends on the task operation defined for the task.
To create a connection, click New. To edit a connection, click View, and in the View Connection dialog box, click Edit.
Target Object
If the connection includes less than 200 objects, select a target object or click Select.
If the connection includes more than 200 objects, click Select.
The Select Target Object dialog box displays up to 200 objects. If the object you want to use does not appear, enter a search string to reduce the number of objects that display.
Select a target object and click OK.
Display Technical Field Names Instead of Labels
Displays technical names instead of business names.
Not available for all connection types.
Display Target Fields in Alphabetical Order
Displays target fields in alphabetical order instead of the order returned by the target system.
Formatting Options
For Flat File and FTP/SFTP connections only. Select a delimiter and text qualifier. Optionally, select an escape character.
If you choose Other for the delimiter, the delimiter cannot be an alphanumeric character or a double quotation mark.
If you choose a delimiter for an FTP/SFTP flat file, Data Integration applies the delimiter to the local file, not the remote file, when previewing and reading data. If the remote and local files are not synchronized, you might see unexpected results.
Create Target
Flat File and relational database connections only. Creates a target file.
You can create a target file when the source connection is Salesforce, database, or ODBC, and the source object is Single or Custom.
Enter a file name and select the source fields that you want to use. By default, all source fields are used.
Truncate Target
Database targets with the Insert task operation only. Truncates a database target table before inserting new rows.
- True. Truncates the target table before inserting all rows.
- False. Inserts new rows without truncating the target table.
Default is False.
Enable Target Bulk Load
Select this option to write data in bulk mode. The default value is false.
2If preview data does not appear automatically, click Show Data Preview to preview data.
The Data Preview area shows the first ten rows of the first five columns in the target. It also shows the total number of columns in the target.
The Data Preview area does not display certain Unicode characters correctly. If the data contains binary data, the Data Preview area shows the following text:
BINARY DATA
3To preview all target columns in a file, click Preview All Columns.
The file shows the first ten rows of the target.
4Click Next.
Configuring the data filters
Use a data filter to reduce the number of source rows that the synchronization task reads for the task. By default, the synchronization task reads all source rows.
1On the Data Filters page, choose whether to read all rows in sources or to read the first set of rows in sources.
- To read all rows, select Process all rows.
- To read the first set of rows, select Process only the first and enter a number.
2To create a data filter, click New.
- To create a simple data filter, select a source column and operator. Enter the value you want to use, and click OK.
- To create an advanced data filter, click Advanced. Enter the field expression you want to use and click OK.
You can use parameters defined in a parameter file in data filters. When you use a parameter in a data filter, start the data filter with the parameter. For example, use $$Sales < 100000 instead of 100000 > $$Sales.
To delete a data filter, click Delete.
3Click Next.
Configuring the field mapping
Configure field mappings to define the data that the synchronization task writes to the target.
1On the Field Mapping page, configure field mappings.
2If you included multiple source objects in the task, you can select each source object in the Source field to display the fields for the selected object. Or, you can view all source object fields.
When displaying all source object fields, the Sources table displays field names grouped by source object. You can place the cursor over the Status icon for a source field to determine the following information:
- Database table or Salesforce object to which the field belongs.
- data type of a field.
3Some source types allow you to configure field data types. To configure field data types for a source, click Edit Types.
If the task includes more than one source, first select the source you want to edit.
In the Edit Field Datatypes dialog box, configure the following data type attributes and click OK:
data type attribute
Description
Datatype
The data type of data in the column.
Precision
Total number of digits in a number. For example, the number 123.45 has a precision of 5.
The precision must be greater than or equal to 1.
Scale
Number of digits to the right of the decimal point of a number. For example, the number 123.45 has a scale of 2.
Scale must be greater than or equal to 0.
The scale of a number must be less than its precision.
The maximum scale for a numeric data type is 65535.
4To add a mapplet, complete the following steps:
aClick Add Mapplet.
bIn the Add Mapplet dialog box, select the mapplet.
cTo display technical names instead of business names, select Display technical field names instead of labels.
dTo display fields in alphabetical order, click Display mapplet fields in alphabetical order.
By default, fields appear in the order specified by the mapplet.
eIf necessary, select a connection for the mapplet.
fClick OK.
5To configure field mappings, for Mapping Selection, select one of the following options:
- Source to Target. Displays the source and target. Map source fields to the applicable target fields.
- Source to Mapplet. Displays the source and the input fields of the mapplet. Map the source fields to the applicable input fields of the mapplet.
- Mapplet to Target. Displays the output fields of the mapplet and the target fields. Map the output fields of the mapplet to the applicable target fields.
The Clear Mapping, Automap, and Validate Mapping buttons apply to the selected area of the field mapping.
6To match fields with the same name, click Automap > Exact Field Name. Or, to match fields with similar names, click Automap > Smart Map.
You can also select and drag the source fields to the applicable target fields.
Data Integration caches field metadata. If the fields do not appear correctly, click Refresh Fields to update the cache and view the latest field attributes.
7To configure field data types for a target, click Edit Types.
This option is not available for all target types. If the task includes more than one target, first select the target you want to edit.
In the Edit Field Datatypes dialog box, configure the following data type attributes and click OK:
data type attribute
Description
Datatype
The data type of data in the column.
Precision
Total number of digits in a number. For example, the number 123.45 has a precision of 5.
The precision must be greater than or equal to 1.
Scale
Number of digits to the right of the decimal point of a number. For example, the number 123.45 has a scale of 2.
Scale must be greater than or equal to 0.
The scale of a number must be less than its precision.
The maximum scale for a numeric data type is 65535.
8To create an expression to transform data, click the Add or Edit Expression icon in the Actions column.
In the Field Expressions dialog box, enter the expression you want to use and click OK.
You can use parameters defined in a parameter file in expressions.
9To create a lookup, click the Add or Edit Lookup icon.
In the Field Lookup dialog box, configure the following properties and click OK:
Option
Description
Lookup Connection
Connection for the lookup object.
Lookup Object
Object on which you want to lookup a value.
Display Technical Field Names Instead of Labels
Displays technical names instead of business names.
Not available for all connection types.
Display Fields in Alphabetical Order
Displays lookup fields in alphabetical order.
By default, fields appear in the order returned by the lookup system.
Source Fields
Source column to use in the lookup condition.
Lookup Fields
The column in the lookup table to use in the lookup condition.
Output Field
The column in the lookup table that contains the output value.
Multiplicity
Determines how to handle cases when a lookup returns multiple values:
- Error If More Than 1 Output Value. Select if the synchronization task should display an error when the lookup condition returns multiple values. Data Integration rejects rows when multiple matches are found, writing them to the error rows file. This is the default.
- Randomly Pick 1 Output Value. Select if the synchronization task should choose the first returned value when a lookup condition returns multiple values. Different systems might use different orders to return lookup values.
Expression
A simple expression that uses the $OutputField variable to represent the lookup return value.
Enter a simple expression, such as $OutputField*100.
You can use parameters defined in a parameter file in lookup expressions.
To return the lookup return value without an additional expression, use $OutputField.
10To clear an expression or lookup and delete the field mapping, click the Clear Expression/Lookup icon next to the target field.
11To clear all field mappings, click Clear Mapping.
12To validate a mapping, click Validate Mapping.
13Click Next.
Configuring a schedule and advanced options
On the Schedule page of the synchronization task wizard, you can specify to run a synchronization task manually or schedule it to run at a specific time or interval. You can create a schedule or use an existing schedule.
You can also configure email notifications and advanced options for the task on the Schedule page.
1On the Schedule page, choose whether to run the task on a schedule or without a schedule.
2To run a task on a schedule, click Run this task on schedule and select the schedule you want to use.
To create a new schedule, click New. Enter schedule details and click OK.
To remove the task from a schedule, click Do not run this task on a schedule.
3If necessary, select a runtime environment to run the task.
4Optionally, if the task runs in a serverless runtime environment, configure serverless usage properties.
5Configure email notification options for the task.
6Optionally, configure advanced options.
You can configure the following advanced options:
Advanced options
Description
Preprocessing Commands
Command to run before the task.
Postprocessing Commands
Command to run after the task completes.
Parameter File Name
Name of the file that contains the definitions and values of user-defined parameters used in the task.
Maximum Number of Log Files
Number of session log files, error log files, and import log files to retain. By default, Data Integration stores each type of log file for 10 runs before it overwrites the log files for new runs.
If the database target does not include a primary key column, and the task performs an update, upsert, or delete task operation, click Add to add a temporary key.
Upsert Field Name
The target field to use to perform upserts.
7Choose whether to run the task in standard or verbose execution mode.
If you select verbose execution mode, the mapping generates additional data in the logs that you can use for troubleshooting. It is recommended that you select verbose execution mode only for troubleshooting purposes. Verbose execution mode impacts performance because of the amount of data it generates.