โ07-04-2022 12:28 PM
Hi,
I have CSV files coming through some third parties and sometimes it comes to empty i.e. only with headers and no data. Can you suggest how I can handle such files?
Solved! Go to Solution.
โ07-07-2022 09:13 AM
That is because your file contains an extension .csv but you saved it as .txt
So after saving it as csv it goes to the no data output
Let me know if it works
โ07-05-2022 12:00 AM
Hi @amit.saroha ,
You mean you want those files out? Then I can suggest you check the checkbox โignore empty streamโ.
Because it will write those files to the error view (both an empty binary stream and a binary stream with CSV headers only).
You can find the explanation also in the documentation here.
Regards
Jens
โ07-05-2022 08:17 AM
I donโt want to error out the pipeline actually.
โ07-05-2022 09:55 PM
It doesnโt go out of the pipeline if you donโt want to.
Example below: the csv parser his error data is set to โroute error data to error viewโ. Then a error output will be showed above the parser after that you can define what to do with the error map the right fields and sent an e-mail for example.
If this solution doesnโt help you there is an option 2:
Option 3:
If you donโt want those empty files use a filter snap with a condition that a field is not null and then you only get the filled snaps.
Regards
Jens
โ07-06-2022 06:41 AM
@JensDeveloper - Thank you, but if I do as you suggested it will create an issue with the insert statement, right? How I can pass โSโ in the last mapper in both cases when I have data inserted or not inserted.