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

using parameters in tFileFetch

Im tring to fetch a an xml file from "http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml?query=Chicago,IL"
But instead of typing the URL can I use a variable insteadlik:
"http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml?query="+name+"";
Ii'm just getting started with talend can anyone help me out
Labels (3)
7 Replies
Anonymous
Not applicable
Author

Hi
Yes, you can set a dynamic url with context variables, for example,
Create a context variable called name in context viewer, and then set a dynamic URL:
" http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml?query="+context.name
And you can load the value of context variable at runtime.
Let us know if you have any questions!
Best regards
Shong
Anonymous
Not applicable
Author

how do I load it at run time if I run the job as a webservice??
Anonymous
Not applicable
Author

Hi
Where does the value of name come from in your case? db? file? or input by user who call the webservice?
Best regards
Shong
Anonymous
Not applicable
Author

from when a run the job through webservice.........so it will get the xml file according to the name I specify when runing the job
Anonymous
Not applicable
Author

something Like setting the value of the context variable when I run the job from webservice
Anonymous
Not applicable
Author

one question.......how do I set the arg if I want to call the webservice from a java program...........Im trying this
arg = "--context.param zip=94954";
arg = "--context_param date=2011-02-"
It says incompatible type: required org.talend.Args
found String
Anonymous
Not applicable
Author

one question.......how do I set the arg if I want to call the webservice from a java program...........Im trying this
arg = "--context.param zip=94954";
arg = "--context_param date=2011-02-"
It says incompatible type: required org.talend.Args
found String

Hi
Please report a new topic about this question if it is not related to this topic.
Thanks for your support!
Best regards
Shong