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

Hello lotu
Thanks for your interesting in Talend.
You can not only call a Java program in a Talend job, but also call a Talend job in a Java program. You can simply follow the steps below:
1) Create a simple job in TOS.(see screenshot1)
2) Export the job Java script.(see screenshot 2 and 3)
3) Unzip the Java script file on current folder.
4) Launch Eclipse and create a new Java project, then create a class 'Talend.java'.(see screenshot4)
5) Right click on test and select 'Build Path'-->'Configure Build Path'. (see screenshot 5)
6) Click on 'Add External Jars' button to import the jar file 'myjob_0_1.jar' (under myJob_0.1\myJob_0.1\myJob) and all the jar files (under myJob_0.1\myJob_0.1\lib) (see screenshot 6 and 7)
7) Type in the Java code in class 'Talend.java' (see screenshot 😎
public class Talend
{
public static void main(String[] args)
{
shong.myjob_0_1.myJob.main(new String[]{});
}
}

Here you will notice that:
shong: Talend project name
myjob_0_1: jar file name
myJob: Talend job name
😎 Finally, run the Java program.(see the screenshot 9)
Best regards
shong
0683p000009MA2y.jpg 0683p000009MA2L.jpg 0683p000009MADR.jpg 0683p000009MADW.jpg 0683p000009MADb.jpg 0683p000009MAAt.jpg 0683p000009MA8N.jpg 0683p000009MA9G.jpg 0683p000009M9zC.jpg
Anonymous
Not applicable
Author

Hi everybody !
I'm very interisting by this solution but I'm interisting by two other things.
The first is I would like give argument for the context param
And the second my job finish by a tBuffertOutput component and I would like to recup the data.
How can I do ?
Thank you !
Anonymous
Not applicable
Author

Hi togethter,
I wrote a integration for a talend job to is it in the Job Scheduler.
One part of the integration is a java wrapper to easily call a talend job (because additional you have to solve (depending of your configuration) some problems with the class path.
tBuffetOuput is not possible but may be worth a closer look.
If you would like to have more information you can contact me by PM. I'll publish the code (as open source) as soon I get time to do it ...
Bye
Volker
Anonymous
Not applicable
Author

I published a first version of the code at sourceforge http://sourceforge.net/projects/talendjobschedu/.
If you have any question please contact me (until I wrote a documentation).
Bye
Volker
Anonymous
Not applicable
Author

Hi Volker
Nice work you have done there.
I had an analog Wrapper to implements and found your post, and downloaded your source code.
To go further, did you think about how Talend could notify progress to your application.
Some "callback" interface allowing the app to display job progress for instance.
I will try something around tSocketOutput and a RMI listener in app or in the Wrapper.

Regards
Anonymous
Not applicable
Author

Hi there,
I'am just evaluating the job scheduler Volker was takling about and I was starting to write a wrapper class too.
I didn't test yours yet, but does it works with the new version 3.1.x of Talend, I notice some stuffs changed.
If you have some documentation about it, it would help me too to get started (conventions about context variables and sos params).
I'm deeply interested in any integration of talend job, with other opensource plateforms.
I worked on an GUI TalendJobLauncher based on the .item xml source file to get parameters.
I don't know if there is some neat way to split a talend job in steps a third party product could control, (apart from creating distinct jobs of course).
Regards
Anonymous
Not applicable
Author

Did anybody tried an integration with http://community.intalio.com/ an open source BPMS ?
Anonymous
Not applicable
Author

Hi Morbo,
I didn't test the scheduler with 3.1. But I set it just now on my ToDo list. I can't believe that this will be a big effort. But actual there much work to do at my job and that means less spare time 😐
If you have any detailed question, just ask. I'll monitor this thread (I actual don't manage to read all) but you could also send me a pm.
Bye
Volker
Anonymous
Not applicable
Author

7) Type in the Java code in class 'Talend.java' (see screenshot 😎
public class Talend
{
public static void main(String[] args)
{
shong.myjob_0_1.myJob.main(new String[]{});
}
}

shong

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