Expert Consultancy from Yellow Pelican

Design Introduction

A site about Talend

Talend Component Design Introduction

As discussed in Talend Custom Component Creation, a component is a neatly packaged piece of Java code that appears in the Component Palette. You add components to your Job, connect them, configure them, and then things happen.

When you design your own components, you must consider that these components interact with both Talend Studio at design-time, and your Job at run-time.

Component Designer

In the next article in this series, we'll have an introduction to the Component Designer perspective.

General wisdom suggests that you should perform all of your component design from within the Component Designer; however, in practice, this is not necessarily the case.

Should I use the Component Designer?

There's no right or wrong answer to this question. The two extreme answers to this question are: -

In the case of the latter option (which is usually my preferred option) you will, as a minimum, use the Component Designer to Push Components to Palette.

Whichever approach you take, it is helpful to note that, as a design tool, the Component Designer is meeting a minimum requirement rather than being a full-featured and elegant development environment.

What's the best starting point?

The Component Designer allows you to create a new component from scratch. This component will be provided with some basic configuration that is suitable for a general purpose component. In the next article, we'll investigate this further, to see exactly what is going on when you create a new component in this way.

The second and usually better approach, is to find an existing component that most closely matches the functionality that you're looking to build, and to use this component as a template. This component may be one of the 800+ of Talend's out-of-the-box components, or it may be one of the 600 or so components that you can find on the Talend Exchange.

Source Code for Standard Components

The Source Code for Talend's standard components can be found in a directory that is located under the base Talend installation directory, for example: -

/Applications/TOS_DI-r117820-V5.5.0/plugins/org.talend.designer.components.localprovider_5.5.0.r117820/components

Note that the localprovider directory also identifies the Talend version number, albeit in a reversed format to the installation base directory. Under the components directory, you will see a sub-directory for each component, for example, tJava.

Minimum File Set

To design a new component, there is a minimum set of files that are required, as summarised in the table below. In later articles, we'll look in detail at the functions that each of these files perform.

FileDescription
tMyComponent_java.xmlXML Descriptor File. This file defines a number of properties that describe your component including headers, inputs, outputs and parameters. This file is descibed by the XSD Component.xsd; which is located under the Talend installation directory.
tMyComponent_messages.propertiesDefault properties file. Language specific property files may be optionally included, for example, tMyComponent_messages_fr.properties (French language).
tMyComponent_begin.javajetYour component must include a minimum of one Eclipse JET file. Available files are begin, main and end.
tMyComponent_icon32.pngA 32x32 pixel Icon in the PNG format. Talend provides a default Icon for new components; however, it is sensible to find or design a component that reflects the functionality that you are providing. Talend Default Component Icon

Component Designer Project File

In the article on Design Setup, we configured the Component Designer, to identify where our new components will be located. If you have not already done so, read this article now.

When we configure the Component Designer, Talend created a new .project file in this directory, for use by the Component Designer. The following shows a sample of this file. As we work with the Component Designer, we will review this file; which will give us a better understand of the design environment. In your day-to-day component design, there is no need to view or understand this file.

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
        <name>COMPONENT_PROJECT</name>
        <comment></comment>
        <projects>
        </projects>
        <buildSpec>
                <buildCommand>
                        <name>org.eclipse.jdt.core.javabuilder</name>
                        <arguments>
                        </arguments>
                </buildCommand>
        </buildSpec>
        <natures>
                <nature>org.eclipse.jdt.core.javanature</nature>
        </natures>
</projectDescription>

Next Step

The next article in this series is an Introduction to the Component Designer perspective. We'll will take a brief look at this, create a simple default component and get an understanding of the design and deploy process.




Expert Consultancy from Yellow Pelican
comments powered by Disqus

© www.TalendByExample.com