I think this is simple thing but some how I fail with it.
I have this :
ftp://user:password@host/Folder/Folder/Folder/../${Year}/${Month}/*.csv
What I'm trying is to open whatever folder name follow by specific folder name. I'm try to access file with the path like that but fail. The fail is in this part /../
.
/../
this part should mean whatever folder, but somehow the path is going back to previous folder. 3 folders are need to open have a fix name so I can't change it.
e.g when I use this ftp://user:password@host/Folder/Folder/Folder/../${Year}/${Month}/*.csv
path, it will open folder like this ftp://user:password@host/Folder/Folder/${Year}/${Month}/*.csv
. It's going back 1 folder and follow by folder from variable then the file.
I use this /../
because after 3 folders I open there is about 30+ folder should I check follow by two folder like ${Year}/${Month}
and 3 types regex file like A*.csv B*.csv C*.csv
.
${Year}/${Month}
this variable is use as path and I get from Set Variable
step on previous transformation and yes it is job level transformation.
I use the path to access file on Pentaho Data Integration a.k.a Kettle using Text File Input
Step.
I have thinking to set /../
into variable value, but the variable have at least one value in it and two max so I can't because I have 30+ values.
I have try using Copy row to result
with Get row from result
and do Execute every input row
on the Transformation, but the result always fail, every execute it always first row, same value from first row of field(field contain 30+ foldername I need to), it not move to next row with different value.
I have try this path ftp://user:password@host/Folder/Folder/Folder/
with this regex [^\/]+\/${Year}\/${Month}\/A.*
(fail)
Or
this path ftp://user:password@host/Folder/Folder/Folder/[^\/]+\/${Year}\/${Month}\/
with this regex A.*
(fail)
So, any other suggestion?
N.B My grammar is pretty bad, so stackers allow to edit this question.