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
If there is an error the following three (3) CSV files will be create and store temporary CLI folder:
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”
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).
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: