Copy files with rename based on query

One Star

Copy files with rename based on query

Hello, I need to copy a bunch of files from a folder to another one and rename them during the process ; and I have a table on my database with the actual files' names and the destination names ; I stated a solution with contexte variable but lost my way ; Desperately need guidance to this, thank you
Forteen Stars TRF
Forteen Stars

Re: Copy files with rename based on query

Hi,

Here is the right direction:

tYourdatabaseInput --> tFlowToIterat --> tFileCopy

Hope this helps.


TRF
One Star

Re: Copy files with rename based on query

Dear TRF Thank you for your answer ; can you please elaborate this solution ?
Forteen Stars TRF
Forteen Stars

Re: Copy files with rename based on query

If you connect tFlowToIterate to your tDatabaseInput component, you'll get 1 global variable per field.

Assume you have 3 fields (currentFilename, destinationFolder and destinationFilename) and the flow after tDatabaseInput  is called "row1".

Here is the tFileCopy configuration :

Capture.PNG

 


TRF

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.