0
I configured the PDI to access an FTP server and download a file in csv, so that’s okay, the problem is that inside the folder on the FTP server there will always be more file, example:
REC_PEND_FECH_COM20180219130059.csv REC_PEND_FECH_COM20180219132200.csv REC_PEND_FECH_COM20180219134000.csv . . .
That is to always copy the most current file, how to do this?
Here I used shell script on Pentaho to do FTP and copy the files (Mget in folder), but I do not know how to specify to always capture the latest file within the directory, the file name is dynamic (REC_PEND_FECH_COMaaaammddhhmmss.csv)
Can you help me?
Hey there, Edvaldo! Please provide the solution in your reply, as this link you mentioned may be unavailable some day and we may be without the answer.
– Dherik
use a Select values step to convert the date metadata into the string format you need using the default "yyyymmdd". Then you can use this variable in your step Get a file with FTP as a ${YOUR_DATE wildcard}
– Edvaldo Lucena
you can edit your reply and add this information to it.
– Dherik