How to share a custom component in Talend Studio
A new framework is available to build custom components and must be used from this version onwards. Refer to Developing a component using Talend Component Kit. You can still use this procedure for components created using the deprecated component framework.
This article explains how to share the custom component tFileOutputPDF in Talend Studio.
Then, you will create a Job with the custom component, open the Job in another Talend Studio instance and check that the custom component has been installed automatically and the Job opened without warnings or errors.
When working on a remote project, if a Talend Studio has custom components installed and in use in one or more Jobs, other Talend Studio instances connecting to the same remote project must also have the same custom components installed.
This is necessary to ensure that the Jobs can be opened properly. Without the necessary custom components, you will receive a warning message "Some components are not loaded" when you open a Job using a custom component that has not been installed on the system you are using to open the Job.
Talend Studio provides the ability to automatically install custom components. If you install custom components and share them in Talend Studio manually, subsequent connections to the same remote project by other Talend Studio instances will automatically detect and install custom components.
Creating an example job
Before you begin
- You have downloaded a custom component from TalendForge Exchange and installed it in Talend Studio,
in this example tFileOutputPDF.
For more information about how to install a custom component, see How to install and update a custom component on Talend Help Center.
Launch Talend Studio and connect to a remote project, in this example
- Create an example Job called SharingCustomComponent.
- Drop the tFixedFlowInput and the custom component tFileOutputPDF from the Palette to the design workspace
- Connect the two components together using a connection.
Configure the components
- Double-click the tFixedFlowInput to display its Basic settings view.
- Click the [...] button next to Edit schema to define the input schema.
Click the [+] button and add two input schema columns,
in this example id as Integer and
name as String.
The two schema columns display automatically in the Values list.
Click in the Value column and type in a value for each
of the input columns.
- Set id to 1.
- Set name to "talend".
Double-click the tFileOutputPDF to display its
Basic settings view.
- Click Sync columns to synchronize the output file schema with the input file schema.
- Click the [...] button next to the Destination Name field and browse to the output file you want to print data in, out.pdf in this example.
Press Ctrl+S to save your Job and close it.
You don't need to run the Job, for this example the objective is just to see the Job that contains a custom component can be opened properly in another Talend Studio instance.
Sharing the custom component
Click Project settings in the toolbar.
- Click the Custom component tab under the Designer node.
Select the custom component, tFileOutputPDF, in the
Custom Components list and move it to the
Shared Components list.
- Click OK.
Opening the example Job in another Talend Studio instance
Launch another instance of Talend Studio and connect to the same remote project, in this example
During the startup progress, Talend Studio will automatically detect the custom component from the remote SVN repository and install it locally.
Open the example Job SharingCustomComponent and see that
you don't have the warning message "Some components are not
loaded", meaning the custom components are installed well in
this Talend Studio.
The custom component is installed into the local directory, in this example <Talend Studio_installation_path>\plugins\org.talend.designer.components.localprovider_184.108.40.20670623_1246\components.