Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Global variable

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 ?

Parent JoB
prntscr(dot)com/9ct9ea

Child Job
prntscr(dot)com/9cta50
Labels (2)
13 Replies
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

Hi arnaudbroens

Here is my parent job

prntscr(dot)com/9cu21a

Child Job

prntscr(dot)com/9cu2ai

Properties of components

prntscr(dot)com/9cu2k5
prntscr(dot)com/9cu2or
prntscr(dot)com/9cu2uq
prntscr(dot)com/9cu314
Can you check please where am doing wrong ?
Anonymous
Not applicable
Author

Roy,
In your tFlowToIterate1 check the option 'Use the default (key, value) in global variables'.
Screen me this component and tRunJob please.
Thanks,
Arnaud
Anonymous
Not applicable
Author

arnaudbroens

I have checked the default (key, value) in tflowtoiterate.

Here is my trunjob properties 
http://prntscr.com/9cu9su
And here is the error

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)
Anonymous
Not applicable
Author

Roy,
Can you screen me this tFTPFileList_1 please ?
Thanks,
Arnaud
Anonymous
Not applicable
Author

aranaudbroens
Here is the shot
http://prntscr.com/9cujsq
Anonymous
Not applicable
Author

The options are ok. Can you put a tLogRow after tFixedFlowInput_1 to see data and write me the result please ?
Thanks,
Arnaud
Anonymous
Not applicable
Author

Hey
here's the shot
http://prntscr.com/9cuosp
Don't know arnaudbroens, where am short in this job 0683p000009MPcz.png
Anonymous
Not applicable
Author

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 
0683p000009MACn.png