Talend
has rich set of functions and libraries available with in its suite.
However, you may want to use libraries provided by data vendor or API
vendor e.g. if you want to fetch data from Google Adwords then you may
want to include or import the library/jar files provided by Google into
Talend.
There are two ways to include or import these external jar and library files.
1. Using tLibraryLoad component.
2. By editing the Routine library.
Using tLibraryLoad Component: tLibraryLoad allows you to import and load useable Java libraries in a Job.
Provide the path of the library file to be loaded in the Library text box in component properties. This will allow the Talend Job to use the functions of the library files.
This method is used when you only want to use the library in a single Talend Job. As the library or external jar file imported using tLibraryLoad component will be available to only that Talend Job only.
Hence, if you want to use the library or external jar for the other Jobs as well then importing it by editing the Routine library is preferable.
To import the library jar files using the Routine library, follow the below mentioned steps:
1. Create a custom routine. Right Click on Routines under the Code section in Repository Pane and select Create routine to create a new routine. f you have any other custom routine defined as part of your project then you can skip this step.
Note: We are creating this routine only for editing the routine libraries. This routine will not be used anywhere in the Talend Jobs.
2. Right click the routine created in Step 1 or if you already have a custom routine defined and select Edit Routine Libraries.
3. Click on New on the Import External Library window.
4. Locate the library file using the browse button in the New Module window and click OK.
Now you can use the functions of the external jar or library file in more than one Talend Job.
There are two ways to include or import these external jar and library files.
1. Using tLibraryLoad component.
2. By editing the Routine library.
Using tLibraryLoad Component: tLibraryLoad allows you to import and load useable Java libraries in a Job.
Provide the path of the library file to be loaded in the Library text box in component properties. This will allow the Talend Job to use the functions of the library files.
This method is used when you only want to use the library in a single Talend Job. As the library or external jar file imported using tLibraryLoad component will be available to only that Talend Job only.
Hence, if you want to use the library or external jar for the other Jobs as well then importing it by editing the Routine library is preferable.
To import the library jar files using the Routine library, follow the below mentioned steps:
1. Create a custom routine. Right Click on Routines under the Code section in Repository Pane and select Create routine to create a new routine. f you have any other custom routine defined as part of your project then you can skip this step.
Note: We are creating this routine only for editing the routine libraries. This routine will not be used anywhere in the Talend Jobs.
2. Right click the routine created in Step 1 or if you already have a custom routine defined and select Edit Routine Libraries.
3. Click on New on the Import External Library window.
4. Locate the library file using the browse button in the New Module window and click OK.
Now you can use the functions of the external jar or library file in more than one Talend Job.
Thanks Vikram for this nice post. It's good interesting. Do you prepare these yourself?
ReplyDeleteThanks Pankaj.
ReplyDeleteYes, I generally write on Topics for which I need to research while developing a Talend Job.
ReplyDeletexecution failed : Job compile errors
ReplyDeleteAt least job "DAStudentAgentJob" has a compile errors, please fix and export again.
Error Line: 8846
Detail Message: org.apache.kafka cannot be resolved to a type
There may be some other errors caused by JVM compatibility. Make sure your JVM setup is similar to the studio.
I saw in code I got two error like
<org.apache.kafka.clients.consumer
org.apache.kafka.clients.producer.KafkaProducer
when I saw code in studio I got error here
<org.apache.kafka.clients.consumer
org.apache.kafka.clients.producer.KafkaProducer
I am getting this error .please help anyone why is coming
ReplyDeleteThank you
ReplyDeleteIf we include them through routine libraries, are those jar files will be included when the job is publish in tac?
ReplyDeleteHow the file can be transferred to Job Server for Remote run.
ReplyDeleteMy job is running successfully in Local run but when i run in remote mode i face issue.
first you have to make sure the routine is closed.Only then you can do it. Thanks for the post
ReplyDeleteif the external jar files need property files to read.How to deal with it?
ReplyDeleteWhat does the "Input a library's name" box refer to - I just always get an error message saying " cannot be found in {1}" when I try to use it.
ReplyDeleteHello,
ReplyDeleteCan someone help me to open this job (or driver) on talend please?
if i can only extract the component named : tLabVantageLIMSCIPostData_1
it gona be cool for me...
Thank you in advance
Driver here :
https://file.io/VwjEj0Su6jkD
https://easyupload.io/5iwqpm
Deletehttps://easyupload.io/5iwqpm
ReplyDelete