Expert Consultancy from Yellow Pelican

Talend Reusability

A site about Talend

Talend Reusability

As with any programming environment, reusability is a key component of building reliable and easily maintained solutions. Talend is no exception to this rule.

As well as the functionality offered by Talend, there are also techniques that you can employ to make your development tasks much easier.

As Talend is Java-based (or Python), you also have thousands of Java libraries at your disposal. If, for example, you want to validate and format Telephone Numbers, then why not use Google's Phone Number Handling Library rather than writing your own?


Talend provides many ways to make your code reusable. There are also techniques that we can use to cover some of the things that Talend does not always help with.

  • Jobs - A Job can call another with the use of a tRunJob component.
  • Joblets - Only available in the Enterprise editions of Talend.
  • Context Groups - Define sets of context variables - these can be loaded from external sources.
  • Code Routines - Create your own Classes.
  • Sql Templates.
  • Metadata.
  • Custom Code - Custom code components (including tLibraryLoad).
  • Custom Components - Create your own components.


You can call one Job from another, with the use of the tRunJob Component. This means that you can sub-divide large Complex Jobs in to smaller units, with a master Job orchestrating a number of other Jobs. This also means that you can create Jobs designed to perform specific tasks and then use them from any number of other Jobs. If, for example, you want to load your Context from an external source, why not have a Job that is specifically designed to load Context? You can then call this Job any number of times.

You pass information from one Job to another using Context. As well as passing information to a Child Job, you can also return data using Context. This requires a little bit of magic; which we discuss in our article Returning Vaues from a Subjob (Child Job).


Joblets are only available in Enterprise editions of Talend.

Context Groups

Context Groups allow you to define collections of Context Variables. This allows you to copy these groups to your Jobs. If you change the definition of your Context Group, Talend (mostly) changes the definition in your Jobs.

For more on Context, read our Talend Context Reference.

Code Routines

The Code->Routines section of the Talend Repository allows you to easily define new Java Classes, for use within your Jobs. You'll already see a section Code->Routines->System where Talend has some predefined Classes. As well as being able to use these within your Jobs, you can also use them as templates for creating your own.

Code Routines allow you to package code that you use frequently or Refactor complex code, for readability.

We'll look ar creating our own Routines in a later tutorial and also look at how these can be used in conjunction with tLibraryLoad. For further information on Code Routines look at Talend - What Are Routines?

For more on Context, read our Talend Code Routines Tutorial.

SQL Templates

If you're using Databases in your Jobs, you can create SQL Templates.


Metadata allows you to define a number of inputs and outputs. These may then be used within your Jobs without the need to define them each time.

Custom Code

In the Custom Code Palette you'll find a number of Components to aid you in writing and using custom code.

Custom Components

As well as using the large number of Components supplied by Talend, you can also write your own or install one of the components that has been written by others and is available on the Talend Exchange.

Expert Consultancy from Yellow Pelican
comments powered by Disqus