Validate CSV File Function: csvvalidate
The Validate CSV File function is used to compare the data in a source CSV file against a validation file. The discrepancies, if any, are recorded in a destination file. This function helps identify mismatches or inconsistencies between two CSV files, ensuring data accuracy in automation workflows.
Example: Suppose you have a source CSV file, EmployeeRecords.csv, and a validation file, ValidationData.csv, located at C:\Data. You want to compare these files and save any discrepancies in a new file named ValidationErrors.csv.
Steps to Configure:
- Select Set a Variable Value from the Action dropdown.
- Enter a variable name in the Element Key field (e.g., ValidationStatus). This variable will store the result of the operation (true/false).
- Click on Form, select Functions, and choose Validate CSV File.
- Provide the following parameters:
- sourceFile: Specify the path to the source CSV file (e.g., C:\Data\EmployeeRecords.csv).
- ValidationFile: Specify the path to the validation file (e.g., C:\Data\ValidationData.csv).
- DestinationFile: Specify the path where discrepancies will be saved (e.g., C:\Data\ValidationErrors.csv).
- Click Save.


Outcome on Execution:
- The command compares the data in the source file (EmployeeRecords.csv) with the validation file (ValidationData.csv).
- Any discrepancies found during the comparison are logged in the destination file (ValidationErrors.csv).
- If the validation is successful and no discrepancies are found, the variable (e.g., ValidationStatus) stores true.
- If discrepancies are found or the operation fails (e.g., missing file paths), the variable stores false.
- This variable can be referenced in subsequent automation steps using the syntax ${VariableName} (e.g., ${ValidationStatus}).