Forum Discussion

Matthias's avatar
Matthias
New Contributor III
4 years ago
Solved

File Reader + parser - assign filename

I’ve got a pipeline which is reading multiple files. A simplified version is the below: I’d need the output to contain a column with the filename of the original file. As the file content ...
  • bojanvelevski's avatar
    4 years ago

    Hey @matthias.voppichler,

    You can use Pipeline Execute. Add the CSV in a child pipeline, and pass the filename as a parameter, that way you can read the parameter and map it on every line that will come out of the CSV Parser using a Mapper. Files will be read one at a time, parsed, and the filename will be added to the lines accordingly.

    You can even combine Marjan’s solution with pipeline execute and again you’ll have the same desired result.

    Regards,
    Bojan