cancel
Showing results for 
Search instead for 
Did you mean: 

Error out the entire csv file if one of the value in a row/rows is/are missing.

Soumic_Mohanty
New Contributor II

Hi All,
I am reading an csv file & would send the entire file to error if any of the value in a row/rows are empty.
Using Data validator snap i tried to find out the error row or rows.
How ever unable to send the entire file to error.
Can someone help me with the scenario. 

Soumic_Mohanty_0-1706537093505.png

 

5 REPLIES 5

koryknick
Employee
Employee

@Soumic_Mohanty - one simple solution is to use the error view on the Data Validator, then a Gate to collect the count of errors, followed by a Router to check if there were errors.  Finally, re-read the file to begin processing only if there were no issues.

koryknick_0-1706544047911.png

Note that you will want to set your Gate snap "Output Document Count" to either "Document count and first..." or "Document count and last..." option; otherwise, it will consume all input data into memory which could be very resource intensive and not recommended.

The Router then just needs to check the output from your Gate snap to determine if the error path fed into it had any records.

Hope this helps!

Hi Kory,
Thank you for your help.
I tried to use the same configuration, however still I am stuck.
Would you please share the SLP file here.

Soumic_Mohanty
New Contributor II

I tried to use the same configuration, however still I am stuck.
Would you please share the SLP file here.

koryknick
Employee
Employee

@Soumic_Mohanty - download and decompress the attached zip file, then upload the contained SLP.