[resolved] How to read talend job names in a TOS project?

Six Stars

[resolved] How to read talend job names in a TOS project?

Hi Talend Experts,
I would like to know whether there is a way for me to read all the names of the jobs available under connected TOS project (Does the job meta data stored in a database or XML file?). I am planning to develop an auditing mechanism for the tables loaded and require this to grab the job names dynamically.
Cheers!
Chanaka

Accepted Solutions
One Star

Re: [resolved] How to read talend job names in a TOS project?

Hi Chanaka
This would be a huge project.
According to your description, you need to redevelop Talend Open Studio and integrate it with your own java project.
As you know, Talend Studio has integrated with Talend Administration Center(A web application) as parts of Talend Enterprise Edition.
You'd better download the source code of TOS for DI and delve into the code...
Your requirement can't be accomplished by a simple Talend job.

Regards,
Pedro

All Replies
One Star

Re: [resolved] How to read talend job names in a TOS project?

Hi Chanaka
In each Talend job, there is a String variable called 'jobName'.
You might print it on console.
System.out.println(jobName);

Or pass jobName to other variables.
Regards,
Pedro
Six Stars

Re: [resolved] How to read talend job names in a TOS project?

Hi Pedro,
Thanks a lot for the response. What I am planning to do is the following. For the first step I need to get a list of all the jobs in the project.
1. There would be a scheduled job that runs everyday in each project. That job will check for available jobs under that project and update the etljobs table if any new jobs are created. If any jobs were deleted those will me marked as not active.
2. Whenever an etljob is performing an update or an insert it will use the respective etljobid and update the created_by, updated_by columns of the target table accordingly.
By following this mechanism we can keep a track of all the modifications done in the database.
Cheers!
Chanaka
One Star

Re: [resolved] How to read talend job names in a TOS project?

Hi Chanaka
This would be a huge project.
According to your description, you need to redevelop Talend Open Studio and integrate it with your own java project.
As you know, Talend Studio has integrated with Talend Administration Center(A web application) as parts of Talend Enterprise Edition.
You'd better download the source code of TOS for DI and delve into the code...
Your requirement can't be accomplished by a simple Talend job.

Regards,
Pedro
Six Stars

Re: [resolved] How to read talend job names in a TOS project?

Hi Pedro,
Thanks for the pointer. I posted this thinking there would be some common place or a function call that I can get that info quickly. Right now I found that we can get that info by checking the number of property file names available under <TOS Home>\workspace\<project>\process directory. Still I agree that the direction you provided seems the best thing to do.
Thanks again for the reply!
Cheers!
Chanaka
Six Stars

Re: [resolved] How to read talend job names in a TOS project?

Hi Pedro,
Is it possible to get the talend workspace path from a variable like jobName or projectName?
Cheers!
Chanaka