cancel
Showing results for 
Search instead for 
Did you mean: 

FixedWidthParser Snap, automated loading of columns from csv instead of manually adding 600 columns

anayak
New Contributor III

The title says it all, I want to add columns (around 600) and their start and end position automatically using a SnapLogic trick or Script. It’d be great if I could check the box for ‘Trim Column Data’ as well.
Below is the pic for snap details:
image

Manual work seems a lot and can invite errors. We already have a well-formatted CSV with column names and their start and end position and I would be able to automate the process of adding columns to FixedWidthParser. Any help and ideas are appreciated!

If it’s not possible then I’d appreciate ideas about how can I develop a solution myself.

1 REPLY 1

bojanvelevski
Valued Contributor

Hi @anayak,

I created one solution with a sample data from the documentation. I wasn’t sure how your CSV for defining the fields is formatted, so I did it with a logic of my own. Even if it’s formatted differently, that’s easily manageable.

FixedWidthParser_2021_08_27.slp (10.1 KB)

Regards,
Bojan