Scenario 1: Inserting data in a defined table in a MicrosoftAX server - 6.1

Talend Components Reference Guide

EnrichVersion
6.1
EnrichProdName
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for Data Quality
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

Warning

Before being able to use this component, make sure that you install and launch the MicrosoftAX server correctly.

This Java scenario describes a two-component Job that uses tMSAXOutput to insert four columns in a defined table in a MicrosoftAX server after it alters values in one of the inserted columns.

Setting up the Job

  1. Drop tFixedFlowInput and tMSAXOutput from the Palette to the design workspace.

  2. Connect the two components together using a Row > Main connection.

Configuring tFixedFlowInput

  1. Double-click tFixedFlowInput to display its Basic settings view and define the component properties.

  2. Set Schema type to Built-in and click the three-dot button next to Edit schema to display a dialog box where you can define the input schema.

  3. Click the plus button and add the input schema columns, three in this example: name, city and street.

  4. Click OK to close the dialog box and accept propagating the changes when prompted by the system.

    The three schema columns display automatically in the Values list.

  5. Click in the Value column and enter a value for each of the input columns.

Configuring tMSAXOutput

  1. Double-click tMSAXOutput to open its Basic settings view and define the component properties.

  2. Set Property type to Built-in.

  3. In the Host field, type in the IP address of the MicrosoftAX server and type in the domain name on which the MicrosoftAX server is hosted in the Domain field.

  4. Enter your username and password for the server in the corresponding fields and enter the name of the table you want to write data in the Table Name field, ADDRESS in this example.

  5. In the Action on data list, select the action you want to carry on, Insert in this example.

  6. Click Sync columns to retrieve the schema from the preceding component.

    In this example, we want to retrieve the three input columns: name, city and street and write the data included in the three input columns in the MicrosoftAX server without any changes.

    If needed, click the three-dot button next to Edit Schema to verify the retrieved schema.

  7. In the Additional columns list, click the plus button to add one line where you can define parameters for the new column to add to the row you want to write in the ADDRESS table.

  8. Set a name, a data type, a position and a reference column in the corresponding columns for the line you added.

    In this example, we want to add a new column we call "address" after the street column.

  9. Click in the Local expression column and press Ctrl + space on your keyboard to open the context variable list and select: StringHandling.UPCASE(row2.city)+"-"+row2.street. This expression will write the city name initially capped followed by the street name to form the address of Bryant park. Thus the address column in this example will contain the string: New York-Midtown Manhattan.

Job execution

  • Save your Job and press F6 to execute it.

    tMSAXOutput inserts in the ADDRESS table in the MicrosoftAX server a row that holds the three input columns, name, city and street in addition to the new address column that combines the city name and the street name.