Create a new column with value taken from a subset of the filename

Hello,
I’m evaluating EDT (I’ve just downloaded the software) to see if I can use it for a project I’m working on.
First of all sorry if my question is trivial (as said I’m pretty new, I’ve just started playing with the tool).
I would like to know if is it possible to do the following:
Suppose I have an input file with the following filename structure:
2022_Q2_CUSTOMERNAME_RANDOMSTUFF.csv
I would like to perform a transform and add two columns one called quarter with value Q2 and another called customer with value CUSTOMERNAME taken from the filename.
I tried with “New Col” transform but on “New Column Value” I don’t see any options other than entering the value manually.
Thanks

Use Meta info to add a column with the name of the input file:

Then you can extract from this the quarter and customer name into new columns, e.g. using Extract and Replace transforms.


2022_Q2_CUSTOMERNAME_RANDOMSTUFF.csv (9 Bytes)

meta-example.transform (2.8 KB)

See also:

1 Like