How to create a custom component
Talend offers natively 800+ components within Talend Studio to address your data integration needs. However, if those components do not fulfil your specific needs, you can expand Talend Studio capabilities by creating your own components.
This article describes in detail how to create a component manually step by step and use it within any of your data integration Jobs.
This tutorial covers the following topics, which are essential for developing custom components:
- How to create a component step by step.
- How to install a custom component into your Talend Studio
As a prerequisite, we strongly recommend that you read the articles What is a component and Component code generation model to know how a Talend component is structured, and learn about the component code generation order and related technologies.
Creating a custom component step by step
This procedure will help you create a component manually step by step.
In this example the component you will create is called tTutorialRow, it has only one parameter, of type TABLE. The component will handle a list of email addresses.
This is a very basic component, with no real added value. The main purpose of this tutorial is to put into practice the theory presented in the articles What is a component and Component code generation model, and complete the learning of component creation process.
Step 1: Creating the component folder and the required files
Procedure
Step 2: Editing the XML descriptor file
Procedure
Step 3: Editing the message properties file
Procedure
Step 4: Editing the java template files
Procedure
Installing and testing the created component
Once you have created and defined all the files for a custom component, you can install it into your Talend Studio so that you can use it in your Jobs.
This procedure outlines the steps to install the tTutorialRow component you have just created. For more information on installing, updating and troubleshooting a custom component, see How to install and update a custom component.
Before you begin
If your newly created component requires some jars to function, make sure those jars are always available in <studio>/configuration/.m2/repository/org/talend/libraries. For more information regarding how to import external jars into the Studio, read Installing external modules.
Procedure
More useful information
You can find more useful information about component creation written by Talend Community:
- http://www.powerupbi.com/talend/componentCreation_index.html: a guide that helps you create a custom component.
- http://www.talendbyexample.com/talend-custom-component-analysis.html: an example of tJava that helps you understand the way Talend components are built.