08-02-2023 11:01 PM
Hi,I want to delete the extra columns in CSV File which do not have data in it.While applying CSV Parser its showing that few extra columns are there.I want to delete those extra columns from CSV File.How to do that through help of Snap and Pipeline
08-02-2023 11:44 PM
Hello @Abhishek_117,
You can try by adding a Filter Snap after the CSV Parser with the following expression:
$ != {}
Try this and let me know if this helps you.
Regards,
Aleksandar.
08-03-2023 12:09 AM
Hello @Aleksandar_A ,
Thanks for the concern,but it is not working.
Please let me know if any other way is there that helps me to solve this problem.
Regards,
Abhishek Gupta.
08-03-2023 08:07 AM
@Abhishek_117 - I think the answer you're looking for is already an option in the CSV Parser snap. In the "Header size error policy", select "Trim record to fit header". This will ignore any extra columns in the input data.
Hope this helps!
08-04-2023 06:03 AM
Hi @koryknick ,
Thanks For suggestion, but its working partially. Like I have added irrelevant columns in beginning and its adding data of relevant columns to irrelevant columns and due to which extra columns which are relevant they are becoming null.
Here Tik-Tok,Balance and Results are irrelevant column but when i select "Trim record to fit header" its taking data's from right column i.e CustomerKey,Prefix etc to left columns(which are irrelevant).I want to delete those column