Handling Source and Target Mismatch
When you perform an incremental run with a Salesforce source and a database target, the task might fail if the source and target metadata do not match.
The task can fail because the data type in the Salesforce field and data type for the database target column do not match. The task can also fail if the precision or scale for a Salesforce field increases and the database column might not be able to store the value.
To adjust the target column for changes to source metadata, you can use the AutoAlterColumnType custom configuration property. When you use this property, the Data Replication task modifies the target column metadata to match the source. Set the AutoAlterColumnType custom configuration property for the Secure Agent that runs the Data Replication task.
You cannot use the AutoAlterColumnType property in all situations. If the AutoAlterColumnType property does not resolve a mismatch, you might need to reset the target and reload.
The following table includes a few examples of metadata differences and possible approaches to take:
Source and Target Metadata Mismatch | Action |
---|
Increase in precision | Use AutoAlterColumnType. |
Decrease in precision | Reset target and reload. |
Change in data type | Reset target and reload. |
Additional column | No action required. All load types can resolve this issue. |
Deleted column | No action required. All load types can resolve this issue. |
Setting the AutoAlterColumnType Property
Set the AutoAlterColumnType custom configuration property so the database target column adjusts when the data type, precision, or scale of a Salesforce source field changes. Set this property for the Secure Agent that runs the Data Replication task.
1. Click Configure > Runtime Environments.
2. Click on the Secure Agent that runs the Data Replication task and select Edit Secure Agent.
3. Under Custom Configuration Details, click the Add icon and enter the following values:
Field | Value |
---|
Type | Select Tomcat. |
Sub-type | Select INFO. |
Name | The name of the custom property. Enter AutoAlterColumnType. |
Value | Enter yes to turn on this property. |
4. Click OK to save your changes.