Skip to main content Skip to complementary content

Using custom components

Talend Studio allows you to install the custom components you create or the ones you download from Qlik community or the public archive on GitHub. You can then use them in the Job designs you carry out in Talend Studio.

Note that you can develop custom components using the Talend Component Kit framework and share them on Qlik community. For more information, see Developing a component using Talend Component Kit.

Specifying the user component folder

The user component folder is the folder that contains the components you create and the ones you download from Qlik community or the public archive on GitHub.

For more information, see below Installing a custom component and Updating a custom component.

Procedure

  1. In the tree view of the Preferences dialog box, expand the Talend node and select Components.
  2. Enter the User component folder path or browse to the folder that contains the custom components to be added to the Palette of Talend Studio.

    In order to be imported to the Palette of Talend Studio, the custom components must be in separate folders located at the root of the component folder you have defined.

    Information noteNote: If some pieces of code need to be reused by the javajet files of your custom components, you need to create a folder templates under the user component folder and put your reusable code there. For example, if there is a reusable code file Log4jFileUtil.javajet under the folder templates, you can reuse it in other javajet files by adding <%@ include file="../templates/Log4jFileUtil.javajet"%>.
  3. Click Apply to validate the preferences. You can also click Apply and Close to validate the preferences and close the dialog box.
    Talend Studio restarts and the external components are added to the Palette.

    This configuration is stored in the metadata of the workspace. If the workspace of Talend Studio changes, reset this configuration again.

Installing a custom component

This example installs a custom component called tFileOutputPDF.

Before you begin

Before installing the custom component tFileOutputPDF, you need to download it. For more information about tFileOutputPDF, see Talend Exchange EOL and Custom Components.

After you have downloaded the component or exported your own component as a ZIP file, you can install it into your Talend Studio by taking the following steps.

Information noteNote: To install a mediation component, you need to edit <component>_java.xml in the component ZIP file by adding TYPE="CAMEL" to HEADER before proceeding with the following steps. For example:
<HEADER
    PLATEFORM="ALL"    SERIAL=""
    VERSION="0.102"    STATUS="ALPHA"    
    COMPATIBILITY="ALL"    AUTHOR="Talend"    RELEASE_DATE="20100401A"    STARTABLE="false"    SCHEMA_AUTO_PROPAGATE="false"    DATA_AUTO_PROPAGATE="false"    TYPE="CAMEL"  > 

Procedure

  1. Unzip the archive file and copy the "tFileOutputPDF".component folder to the Clipboard.

    Note the following directory structure, and make sure you copy the right folder.

    tFileoutputPDF // copy this folder

    --- iText-2.0.8.jar

    --- tFileOutputPDF_begin.javajet

    --- tFileOutputPDF_end.javajet

    --- other component's files

  2. Paste the component folder to a dedicated directory where you will store all custom components, for example: D:\custom_component\.
  3. In Talend Studio, click Window in the toolbar, then Preferences > Talend > Component.
  4. Browse to the dedicated component directory where you store all your custom components.
    Components window
  5. Click OK. Talend Studio will reload all the components including the custom components.

    This configuration is stored in the metadata of the workspace. If the workspace of Talend Studio changes, reset this configuration again.

  6. Check that you have successfully installed the component by searching the component name tFileOutputPDF in the Palette.

    If the component does not appear in the Palette, there are several possible causes:

    1. The XML file of component is not well configured. For example: tFileOutputPDF_java.xml for the component presented in the previous example. Open the XML file of component and make sure of the following:
      • The XML file should be well-formed.
      • The Family element should not be missing as this element specifies the component group in the Palette where the custom component is filed under. For example: <FAMILY>File/Management</FAMILY>.
      • The right elements are used in the XML file. To check this, simply compare your custom component XML file with the XML file of an official Talend component. All official components are located in <Talend Studio installation dir>\plugins\org.talend.designer.components.localprovider_x.x.x.rxxxxx\components\.
    2. The component folder pasted into your dedicated custom component directory was wrong. In this case, carry out the installation procedure again.

Updating a custom component

Talend Studio does not recognize automatically the changes made to the custom components folder. If you make changes to components located in the custom component folder, apply the changes by taking one of the following steps.

Procedure

  1. Press the Shift+Ctrl+F3 key combination to reload the components.
  2. Restart Talend Studio to reload the components.
  3. Go to Preferences > Talend > Component of your Talend Studio and click on Apply to take the edits into account.

Enabling or disabling log4j for a custom component

This procedure explains how to enable log4j in a custom component in order to trace and record log messages regarding the execution of this component. Moreover, it also explains how to disable it for the whole component or for a particular parameter.

Before you begin

For more information, see Installing a custom component and Activating and configuring Log4j.

Enabling the log4j for a custom component

Procedure

  1. Open the *_java.xml file corresponding to the custom component for which you want to enable log4j.
  2. In the header element of the file, add the following line:
    LOG4J_ENABLED="true"

    Note that it is advised to append the log4j attribute to the last attribute of the header element.

    The header element of your *_java.xml file looks like this:

    <HEADER
        PLATEFORM="ALL"
        SERIAL=""
        VERSION="2.0"
        STATUS="ALPHA"
      
        COMPATIBILITY="ALL"
        AUTHOR="Component Author"
        RELEASE_DATE="20070525A"
        STARTABLE="false"
    	LOG4J_ENABLED="true"
      >
        <SIGNATURE/>
      </HEADER>

Disabling of log4j for a parameter

Procedure

Add the following attribute to the parameter that you want to deactivate log4j for:
LOG4J_ENABLED="false"
Log4j is activated by default for a parameter.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!