I have requirement where I need to check incoming data and verify if it matches the profile we need or else we need to send error report.What is the best approach for this problem.Should I use script? profile flat file csv data validation error
How are you defining a match? Do you just want to check that the profile and incoming data have the same number of fields, or are you wanting to check data types?
I want to check whether the incoming data have same number of fields
One option might be to set all of the fields in your Flat File Profile to be Mandatory. The incoming document will then fail the first time the profile is used if it is missing fields.
As Trey Yeager already suggested, config the flat file profile first. Then you can use the Cleanse shape to validate documents. See the screenshot below. An alternative is to use a Business Rules shape to validate documents.
The issue here is I have a flat file with X fields.Its okay even if few fields are blank,so making it mandatory throws the error which isn't actually an error.Basically I need to very if all the header elements in my flat file profile matches incoming csv file headers.
Will your incoming file have a row with the headers in it?
Yeah, In my flat file profile having header elements...
This doesn't sound like a great solution, but you could do a string comparison between the header row on the incoming file and a Dynamic Process Property that has a string representing what the header row should look like.
Could you further explain why you are wanting to compare the header of the incoming file to the flat file profile? This may help us come up with a solution.
Retrieving data ...