Talend Open Studio

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.

Talend Open Studio (TOS)

is an Open Source Data Integration software.

From www.talend.com:

"Talend Open Studio

Talend's flagship product, Talend Open Studio, is the most open, innovative and powerful data integration solution on the market today.

Provided as a packaged, out-of-the-box, ready-to-install platform, Talend Open Studio meets the data integration requirements of all organizations – regardless of their size or level of data integration expertise.

Talend Open Studio is a robust product that runs complex integration processes even in the most demanding environments."

It is based on Eclipse and provides a graphical designer and a code generator which allows you to run the integration job for example standalone on your Adempiere server.

It can be used to import or update data connecting directly to the database used by Adempiere.

Alternatively you can extend the provided TOS components with three Adempiere related components to use the Adempiere API and business logic.

These components are an adaption of the components thankfully provided by Astidian and Audaxis for Compiere.

Please have a look at the related sourceforge project for introduction and examples.

Setup

  • Install TOS

Current version is TOS V4.0.1 (r41260)

  • Provide Adempiere libraries

Copy ADEMPIERE_HOME/lib/Adempiere.jar and ADEMPIERE_HOME/lib/CCTools.jar to TOS_HOME/lib/java

  • Point TOS to the directory containing the components
    • From the pulldown menu open Window > Preferences.
    • Select Talend > Components
    • Update field "User component folder:"
    • Apply the changes
  • Create new job
    • Execute "Create Job" from the context menu in the repository browser
    • You should find the components in the Palette area under Business > Adempiere

Examples

Import currency rates

A customer needs an update of currency rates twice per day. There is an import table for that: Menu > System Admin > Data > Dta Import > Import Currency Rate. Using TOS it can be automated.

Remark: TOS provides a User Guide and a Reference Guide. These should be consulted for understanding concepts and terms. I will only show here how TOS could be used.


The bank is providing the rates in an xml file. TOS can use such a file to analyse the structure and create metadata to be used in the job.

TOS rates metadata1.jpg TOS rates metadata2.jpg TOS rates metadata3.jpg

Similarly (in this case manually) I create a description for the import table structure. This will be used for the output to Adempiere.

TOS Importtable metadata.jpg

Now I created a new job called exchangeRates and dragged a tAdempiereConnection component from the Palette area. In the lower part you can see an area where to change the settings of the component.

I have dragged also my previously created file definition from the left and connected both by an OnSubjobOK trigger connection.

TOS ExchangeRates1.jpg

Now I have dragged a tAdempiereOutput component from the Palette. It automatically uses tAdempiereConncetion_1 for Adempiere access. The Adempiere model class name defines which class to use to access Adempiere. I want to insert data and not update already existing data in the table so Insert Mode is selected. The Schema configuration points to the defined import table structure from the Metadata area.

TOS ExchangeRates2.jpg

Now I need a mapping from my input data structure in the xml file to the output data structure in the Adempiere table. I use a tMap component for that.

TOS ExchangeRates3.jpg

A double click on the component opens an editor for the mapping.

TOS Mapping1.jpg

An input field is easily connected to an output field using drag and drop. Sometimes it is necessary to use a bit of Java code to change the data format.

To enable the Adempiere connection I had to put a database connection component in front of it. The job runs perfectly and shows some statistical data.

TOS ExchangeRates4.jpg

The corresponding window shows the imported data.

TOS Import currency1.jpg

The last bit still missing is to press the import button.

This can be performed by using the tAdempiereProcess component from the Palette area. It is reusing the connection to Adempiere and accepts the class name of the process to be started. Process parameters can be set up as well if need be.

TOS ExchangeRates5.jpg

After the processing of the imported data all rates from today are available in the currency rate window.

TOS Currency rate.jpg

Now that it is working I can use Export Job scripts to generate a standalone version. It contains all necessary code and shell scripts for windows or unix platform. Now I can use cron to let it run daily without any more human intervention needed.



[Project Page: http://www.talend.com]