How to check if column is present in Excel file while parsing in snaplogic

490 Views Asked by At

I have an Excel file and I want to insert the data into a database. I need to know if all the columns are present in the excel file. I used the required constraint of the data validator snap to be notified if a column is missing. But no error occurs when the column is missing. How to solve this please?

1

There are 1 best solutions below

0
Bilesh Ganguly On

If the number of columns in the excel file is fixed and you want to throw an error in case the columns don't match then you can simply use a Mapper snap and put all the column headers in the expression of the mapping table keeping the Null-Safe Access setting unchecked.

If you don't want to throw an error then check the Null-Safe Access setting and for each column name provide a default value.

For more information please refer to SnapLogic Docs.