Hi!
So I have a folder with files from different sources that I need to combine and process.
They all share the same field structure and name convention, so I am using one single input step and a regular expression to read them all.
But the problem is that I need to identify the source of each line, and there is no way to know where they come from once I append them.
Having one step per source is not an option because there are many sources and they vary from day to day.
Example:
I have these files:
Daily_Src1_20180517.xlsx
Daily_Src2_20180517.xlsx
Daily_Src4_20180517.xlsx
Daily_Src5_20180517.xlsx
That have this structure:
Field1,Field2,Field3
aaaaaa,aaaaaa,aaaaaa
aaaaaa,aaaaaa,aaaaaa
And I want to read them with one single step and get something like this:
Field1,Field2,Field3,Source
aaaaaa,aaaaaa,aaaaaa,Daily_Src1_20180517.xlsx
aaaaaa,aaaaaa,aaaaaa,Daily_Src1_20180517.xlsx
aaaaaa,aaaaaa,aaaaaa,Daily_Src1_20180517.xlsx
bbbbbb,bbbbbb,bbbbbb,Daily_Src2_20180517.xlsx
....
Is there a way to do this?
Thank you
So I have a folder with files from different sources that I need to combine and process.
They all share the same field structure and name convention, so I am using one single input step and a regular expression to read them all.
But the problem is that I need to identify the source of each line, and there is no way to know where they come from once I append them.
Having one step per source is not an option because there are many sources and they vary from day to day.
Example:
I have these files:
Quote:
Daily_Src1_20180517.xlsx
Daily_Src2_20180517.xlsx
Daily_Src4_20180517.xlsx
Daily_Src5_20180517.xlsx
Quote:
Field1,Field2,Field3
aaaaaa,aaaaaa,aaaaaa
aaaaaa,aaaaaa,aaaaaa
Quote:
Field1,Field2,Field3,Source
aaaaaa,aaaaaa,aaaaaa,Daily_Src1_20180517.xlsx
aaaaaa,aaaaaa,aaaaaa,Daily_Src1_20180517.xlsx
aaaaaa,aaaaaa,aaaaaa,Daily_Src1_20180517.xlsx
bbbbbb,bbbbbb,bbbbbb,Daily_Src2_20180517.xlsx
....
Thank you