Testing a Data Sync

The CLI syncdata command is used to import data from a source to a target. When creating the XML configuration file for the data sync keep the following in mind:

  • The data type of the source columns matches their data type in the configuration file

  • If you have linked columns in the target that they are mapped correctly using the linkColumn attribute

  • That one (1) or more column(s) should be chosen as sync key(s). These column values need to be unique or it will sync the first record in the source to the first record in the target.

  • Not all the columns in the source need to be mapped in the target

  • The order of the column mappings in the target does not need to be the same as in the source

If you have run into issues or errors with your data sync command, be sure that you have validated the following:

  1. Did your data sync execute? (click here to see documentation on monitoring)

  2. Check your Log files for more detailed information

  3. Validate or verify that records have been inserted, updated, deleted or expired based on your configuration

Log Files

If there is an error the following three (3) CSV files will be create and store temporary CLI folder:

  • ExecutionLogID_SourceErrors.csv

  • ExecutionLogID_SyncErrors.csv

  • ExecutionLogID_TargetErrors.csv

Source & Target Error Logs

The SourceErrors and TargetErrors CSV files will have the following three (3) columns:

  • Row - this column identifies the row number of the rejected record. Please note, only data rows are counted, if the source is a file with a number of header rows, this number needs to be added to the row number to get the actual row in the source that is causing the failure.

  • Rejected - will be either a Yes or No. If the field is Yes, this indicates that full record has been skipped. If the field is No, valid fields are inserted/updated and fields with validation errors are not inserted / updated

  • Errors - this column contains a list of fields causing validation errors or an error affecting the whole record, like “Malformed Row”

Sync Error Log

The SynErrors file also has three (3) columns:

  • Failed Operations - this column will display the operation (e.g. INSERT, UPDATE or DELETE)

  • Error - this column will provide a error message as to why the operation failed

  • Record Id - Unique ID in the target system. For Cinchy this is the Cinchy ID. Most systems will have their own unique identifier (e.g. Salesforce ID).

Error Messages

Source/Target Errors

Error

Description

Duplicate Key

The sync key values are not unique & duplicated records are rejected

Malformed Row

The row could not be parsed based on the source schema. For example the record may not have the number of columns mentioned in the source section of the CLI configuration.

Invalid Format Exception

Check the value for this column, there may be a mismatched data type (e.g.inserting a non-digit character in a number column)

Max Length Violation

The text you are trying to insert or update a target field with is too long

Mandatory Rule Violation

No (or incorrect) value provided for a mandatory column

Unresolved Link

Check if the values the CLI is trying to insert/update exist in the linked Cinchy table target

Sync Errors

Records may fail to insert, update or get deleted due to sync errors, these come from the target system when the CLI tries to write data to it. Each target system will return its own errors, here are some examples from Cinchy, note that these are the same errors you see when doing a paste in the Manage Data screen to that table:

Error

Description

Value must be a number

Check the value for this column, there may be a mismatched data type, like trying to insert an non-digit character in a Number column

Value must be a valid date

No (or incorrect) value provided for a mandatory column

Value must be Yes or No

The value passed was not a Bool

Value must be selected from the available options

The value from the source does not correspond to the values in the Cinchy Target choice column

Last updated