Forum Discussion

MikeP's avatar
MikeP
New Contributor II
4 years ago

How do we check if NO DATA in a CSV file after filtering out headers

Hello, I need to check if there is no actual data after reading and parsing a CSV file, I am using the CSV Parser and have checked the ‘Contains Header’ (as we will always have a row with headers), I then follow it with a Mapper. If we have no data at this point we need to stop processing and go down a different route. I’m struggling with how after the Mapper, I check if no data is present in my document ($). We have a router snap next and have tried the following options, but none seem to work in the expression window:-

$ == null
$.isEmpty()

Any help appreciated.
Thanks
Mike