The process of Java code generation from javajet templates of a job

One Star

The process of Java code generation from javajet templates of a job

Talend Data Integration studio, more than anything else, is a code generator. When I design a job in the studio using components from the Palette and run it, Talend combines {javajet template, xml, properties} files of the job and generates a single Java file for the job.

My question: Can I know the process of Java code generation from the javajet templates and properties files? Can I know the commands that are used?

Why I want to know?
I have a hundred jobs but the design of all the jobs are same and only a few parameters change from job to job. Instead of creating all the hundred jobs and later maintaining them, I want to create one job and replicate it after substituting the parameters read from a file. This drastically reduces development time and eases maintenance.

So, if I know the code generation process, I can programmatically read the parameters from a file and generate all the hundred job {javajet template, xml, properties} folders and then use the code generation command to generate the final Java code which can later be built and run.


Thanks in advance for any help.
Community Manager

Re: The process of Java code generation from javajet templates of a job

Hi
The javajet template are interpreted and translated to java source code via EMF, refers to this article
From the point of view of job design, I think you need to use context variable for the parameters that might change from job to job on the same component. 
Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Sixteen Stars

Re: The process of Java code generation from javajet templates of a job

This can be done and I have done it.....but it is tricky and wouldn't be supported by Talend. You do not need to understand Javajet, you need to understand the XML that is used in the Talend job source files. You also need to understand how the projects are held together and the interdependence of the files in the workspace. As I said, it is tricky but possible.