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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Talend as part of another application

Hey I have been using talend a little and I want to use it as part of another Eclipse application. Pretty much I want to take a job and call it from another java program. I could use system to do this but, that is not very portable and I need my application to be portable. Is there any good way to use a talend job inside another java program?

Labels (1)
33 Replies
Anonymous
Not applicable
Author

Hi neil,
sorry for my late answer. I never used --context_param option. But your job will search inside the classpath for the file. So you must ensure that even your properties files are in the cp.
Bye
Volker
Anonymous
Not applicable
Author

Hi,
How can I compile/modify and run my job outside Talend?
I'm fairly new to Java but what I want do to is to modify my job so that it prompts the user to enter dates to be used in the tGoogleAnalytics component. And I think I can only do this outside Talend(?).

Thanks.

Regards,
VL
Anonymous
Not applicable
Author

Hello,
U could use a tJava with :
context.myValue = javax.swing.JOptionPane.showInputDialog("Please input a value");
Anonymous
Not applicable
Author

Thanks Morbo.
That might do the trick, however, how do I make the components wait for the user input?

(sorry if this is getting a bit off topic, I still want to know how to use the generated code in another tool)
Anonymous
Not applicable
Author

The prompt will block the process until the user confirm the dialog.
I've made an Talend job GUI launcher for exported jobs (with sources included) which asks for context values marked as "prompt". It's a eclipse RCP project, I might publish it someday.
Anonymous
Not applicable
Author

OK, so maybe my question should be how to rearrange the flow of the components(?).
The tGoogleAnalytics is being run first and, obviously, fires an error.
Again, thank you.


Edit: managed to control the flow with the "OnComponentOk" flow. Is this the right way?
Anonymous
Not applicable
Author

Place a tjava as the first component, it should be green, then use a trigger "onSubJob ok" to link to the rest of the job.
_AnonymousUser
Specialist III
Specialist III

Can anybody tell us the way to launch a TOS job which uses Default.properties outside of TOS?
Anonymous
Not applicable
Author

I made a GUI job launcher a while ago.
http://www.assembla.com/wiki/show/inserm-sirh-talend-joblauncher
I didn't test it with the newest version of TOS though.
Anonymous
Not applicable
Author

How does one also specify the path to any relevant context files that might be required using this approach? I have seen a few threads about this but nothing from those seems to be helping me very much (they appear to work within batch files but I've not seen mention of them regarding an integrated project).
For example - Talend Open Studio will deliver a properties file such as job/jobname/context/Default.properties. I copy those properties into my project but can't seem to get the job to pick them up using the switch '--context_param file= /properties/Default.properties'
Any help appreicated.
cheers,
neil

i try to use project 'Implicity Loading' and set the properties file to be collected from the OS variable (System.getenv("TALEND_INITIAL_CONTEXT")
the variable has to exist on the server running the job and contain the path to a file like: c:/somefolder/talend_properties/context_default.properties
this contains file variables for a database connection; from this DB i can collect all other variables that i need.
it is handy since all variables can be changed in the DB without editing Talend Jobs.
you have to make sure that any Context that you use are loaded from the DB.
ris it clear?
Nicolas