Retrieving the File Path from a Table in Order to Assign the File Name

One Star

Retrieving the File Path from a Table in Order to Assign the File Name

Hello,
I?m very new to Talend. I?m trying to create a job that will read one or more file paths from a database table and populate the parameter in the tFileInputDelimited component. That would be the first step involved in processing a number of files.
I?ve tried the following:
tMysqlInput?tFlowToIterate --iterate--> tFileInputDelimited -------<Additional File processing>
But I?m receiving this error:
java.lang.IllegalArgumentException: Parameter can't be null.

I?m not even sure if this is the correct approach. Ideally I think I would like to be able to pass the file path as a variable to a sub job that would process each file. Unfortunately, I?m not even sure where to start with that.

Any help would be greatly appreciated!
Thanks
Patrick
Community Manager

Re: Retrieving the File Path from a Table in Order to Assign the File Name

Hello Patrick
First, you are getting the correct approach, but maybe you don't set the correct parameter of component.
Suppose there is one column: filePath on tMysqlInput, enter the parameter below in file name field on tFileInputDelimited:
(String)globalMap.get("row1.filePath")
If you want more precise answer, please upload some screenshot of your job.
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Retrieving the File Path from a Table in Order to Assign the File Name

That worked!
Thank you for your help.