Changing Column Separator dynamically for CSV node

Hi,

I would like to know if it is possible to set the Separator value to be dynamic (or link it to a global environment variable)?

Example, I want the first 2 columns separator to be (lets say) 5 spaces, and the separator for the next 2 columns to be a string ";;".

{Column1} {Column2};;{Column3}

Thanks

1 Like

No. I'm afraid that's not possible. That also isn't a CSV like file. You would need to preprocess it first, maybe changing the 5 spaces into another ;

Thanks, does that mean we cannot change any properties of any nodes to be replaced by a variable? For example- the column names of the csv node?

the details of what properties for a node can be overridden by the incoming message object are listed in the info panel for the node

Yup, but the column property of the csv node is not a part of the incoming messages listed in info. I thought, it would still be possible to access it somehow?

you can use environment variables to set them at start time - but not dynamically no.
Or you can just leave blank and they will get automatically assigned col1,col2,col3 etc - and you can then rename them afterwards if you like.

rename the column names afterwards? how?
Or you mean manually enter the column names in the csv node later on?

It looks like you after a specialised csv processing method that's probably going to need a custom function node writing to do what your after

Indeed, it sounds more like the OP is trying to process a text input into columns. That isn't really what the CSV node is for. It would likely be better done using a file-in node and a function node to process the data.

Thank you everyone for the feedback.