tMSAXOutput - 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

tMSAXOutput properties

Component family

Business/ Microsoft AX

 

Function

tMSAXOutput connects to a MicrosoftAX server.

Purpose

This component allows to write data in a MicrosoftAX server.

Basic settings

Property type

Either Built-in or Repository.

 

 

Built-in: No property data stored centrally.

 

 

Repository: Select the Repository file where properties are stored. The fields that come after are pre-filled in using the fetched data.

 

Version

Select the type of the business connector to be used. The type may be:

  • Dynamics AX 4.0

  • Dynamics AX 2012

Note

Dynamics AX 2012 type only.

.NET Business Connector Assembly Path

Browse to, or enter the path to the assembly file of your .NET business connector.

 

Host

Type in the IP address of the MicrosoftAX server.

Note

When you are using the .NET business connector, the relevant Job must be executed on the server where your dynamics AX server is hosted. If your Studio allows you to use a Jobserver to execute this Job, you have to deploy this Jobserver on the host server of your dynamics AX server.

Note

Dynamics AX 2012 type only.

Port

Enter the number of the Port of the .NET connector to be used.

Note

Dynamics AX 2012 type only.

AOS Server Instance

Enter the name of the computer that runs the instance of Application Object Server (AOS) you need to connect to.

 

Domain

Type in the domain name on which the MicrosoftAX server is hosted.

 

User and Password

Type in user authentication data.

To enter the password, click the [...] button next to the password field, and then in the pop-up dialog box enter the password between double quotes and click OK to save the settings.

Note

Dynamics AX 2012 type only.

Company

Enter the name of the company.

Note

Dynamics AX 2012 type only.

Language

Enter the display language you need to use.

Note

Dynamics AX 2012 type only.

Configuration File Specify the location of the file which provides the configuration settings to be used.

 

Table Name

Name of the table you want to connect to and write/modify data in.

 

Action on data

You can do any of the following operations on the data in a MicrosoftAX server:

Insert: insert data.

Update: update data.

Insert or update: Insert a new record. If the record with the given reference already exists, an update would be made.

Update or insert: Update the record with the given reference. If the record does not exist, a new record would be inserted.

Delete: delete data.

 

Schema and Edit Schema

A schema is a row description. It defines the number of fields (columns) to be processed and passed on to the next component. The schema is either Built-In or stored remotely in the Repository.

Since version 5.6, both the Built-In mode and the Repository mode are available in any of the Talend solutions.

Click Edit schema to make changes to the schema. If the current schema is of the Repository type, three options are available:

  • View schema: choose this option to view the schema only.

  • Change to built-in property: choose this option to change the schema to Built-in for local changes.

  • Update repository connection: choose this option to change the schema stored in the repository and decide whether to propagate the changes to all the Jobs upon completion. If you just want to propagate the changes to the current Job, you can select No upon completion and choose this schema metadata again in the [Repository Content] window.

 

Die on error

This check box is selected by default. Clear the check box to skip the row on error and complete the process for error-free rows. If needed, you can retrieve the rows on error via a Row > Rejects link.

 

Additional Columns

This option allows you to use Local expressions to perform actions on columns. For example, you can alter values in columns of the defined table.

When you update or delete data in a column, this option provides you with other possibilities on WHERE statements through using different operators from the Operator column.

Name: name of the schema column to be altered or inserted as a new column.

Operator: select in the list the operator you want to use with the WHERE statement.

Note

This column is not available when you use In­sert as action on data.

Data type: type of data.

Local expression: Type in the Local statement to be executed in order to alter or insert the relevant column data, for example row1.[row name]. Or, press Ctrl + Space and select any of the context variables available in the list.

Position: select in the list Before, After or Replace following the action you want to perform on the reference column.

Reference column: type in a column of reference that the component can use to place/replace the new/ altered column.

Advanced settings

tStatCatcher Statistics

Select this check box to gather the Job processing metadata at a Job level as well as at each component level.

Global Variables

NB_LINE: the number of rows read by an input component or transferred to an output component. This is an After variable and it returns an integer.

NB_LINE_UPDATED: the number of rows updated. This is an After variable and it returns an integer.

NB_LINE_INSERTED: the number of rows inserted. This is an After variable and it returns an integer.

NB_LINE_DELETED: the number of rows deleted. This is an After variable and it returns an integer.

NB_LINE_REJECTED: the number of rows rejected. This is an After variable and it returns an integer.

ERROR_MESSAGE: the error message generated by the component when an error occurs. This is an After variable and it returns a string. This variable functions only if the Die on error check box is cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl + Space to access the variable list and choose the variable to use from it.

For further information about variables, see Talend Studio User Guide.

Usage

This component is used as an output component. An Input component is required.

Limitation

n/a

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

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.

Scenario 2: Deleting data from a defined table in a MicrosoftAX server

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 delete from a defined table in a MicrosoftAX server all rows that do not match the data included in a key column.

In this example, the input schema we use is an address column that holds the following data: New York-Midtown Manhattan. We want to delete from the MicrosoftAX server all addresses that are not identical with this one.

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, address in this example.

  4. Click OK to close the dialog box. The schema column displays automatically in the Values list.

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

Setting up the connection to the MicrosoftAX server

  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.

  4. In the Domain field, type in the domain name on which the MicrosoftAX server is hosted.

  5. Enter your username and password for the server in the corresponding fields.

  6. In the Table Name field, enter the name of the table you want to delete data from, ADDRESS in this example.

Defining the action on data

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

  2. Click Sync columns to retrieve the schema from the preceding component. In this example, we want to retrieve the input column: address.

  3. Click the three-dot button next to Edit Schema to open a dialog box where you can verify the retrieved schema.

  4. In the output schema, select the Key check box next to the column name you want to define as a key column, and then click OK to validate your changes and close the dialog box.

    Note

    When you select Delete as an action on data, you must always define the Reference column as a key column in order for tMSAXOutput to delete rows based on this key column.

  5. In the Additional columns list, click the plus button to add one line and define the parameters the component will use as basis for the delete operation.

  6. Set a name, an operator, a data type, a local expression, a position and a reference column in the corresponding columns for the line you added.

    In this example, we want to delete from the ADDRESS table in the MicrosoftAX server all rows in which the address column is not equal to the address in the key address column and that reads as the following: New York-Midtown Manhattan.

    Note

    When you select Delete as an action on data, you must always set Position to Replace. Otherwise, all settings in the Additional columns will not be taken into account when executing your Job.

Job execution

  • Save your Job and press F6 to execute it.

    tMSAXOutput deletes from the ADDRESS table in the MicrosoftAX server all rows where the address string is not equal to the address in the key column.