Hi
I'm trying to download files from ftp from two folders: folder1 and folder2
And store that files into local machine in their respective folders. In local machine, name of folders are same like folder1 and folder2
Path of folders in local machine is C/Users/royDesktop/Talend At this location both both folders are there folder1 and folder2
So for common path I have developed context variable and trying to add after any global variable.
In child job, how can I call global variable with context variable in fields in tftpfilelist , tftpget components.
Like this context.remotedirectory + folder1(how to define global variable here for different varable and keep changing while job run.)
Is that possible to get values of these variable from parent job like I'm trying to do ?
Hi,
In your parent, your tFlowToIterate generate global variable automaticaly (check option).
So, keep your context variable with your path 'C/Users/royDesktop/Talend' and add a context variable 'folder_name' (default empty). These 2 context variable must be declarated on the parent job and the child job.
In your parent job, on the tRunJob component, add a variable on parameter list 'folder_name' value globalMap.get("row2.name_of_the_folder_in_schema"))
And, in the chlid use context path et context folder.
Arnaud
Roy, In your tFlowToIterate1 check the option 'Use the default (key, value) in global variables'. Screen me this component and tRunJob please. Thanks, Arnaud
Exception in component tFTPFileList_1
com.enterprisedt.net.ftp.FTPException: 550 /roy/null: No such file or directory
at com.enterprisedt.net.ftp.FTPControlSocket.validateReply(FTPControlSocket.java:1201)
When I add
context.remotedirectory+globalMap.get("remotedirectory") in remote directory filed in tftpfilelist it show error
Exception in component tFTPFileList_1
com.enterprisedt.net.ftp.FTPException: 550 /roy/null: No such file or directory
/roy/ : this path of ftp I have stored in context variable. And when I add /roy/+ global variable I have declared shows error
I'm trying to add use global variable with /roy/ path cos directory's folders could change automatically on every iteration from parent job.
Hope you understand what am looking for