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

Function

This component invokes the NetSuite SOAP service and retrieves data according to the conditions you specify.

Purpose

This component allows you to access the NetSuite SOAP server and retrieve data from it.

tNetsuiteInput properties

Component family

Business/NetSuite

 

Basic settings

Username and Password

Enter your user credentials to access the NetSuite SOAP service.

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.

 

Role

Enter your NetSuite role ID.

 

Account

Enter your NetSuite account name.

 

Record Type

Select a type of record you want to retrieve.

 

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.

 

 

Built-In: You create and store the schema locally for this component only. Related topic: see Talend Studio User Guide.

 

 

Repository: You have already created the schema and stored it in the Repository. You can reuse it in various projects and Job designs. Related topic: see Talend Studio User Guide.

 

 

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.

Warning

The schema of this component is prefilled with columns corresponding to the NetSuite service fields, which vary depending on the Record Type selected. You can delete columns that are not relevant to your operation, but do not rename any schema columns or this may cause execution errors.

 

Search Criteria

Define search conditions to match fields for data retrieval. Click the [+] button to add as many rows as you need, each row for a condition, and define each of your conditions:

  • Field Name: select a field to search based on the condition.

  • Operator: select an operator for the field search condition.

  • Value: enter the value for the field search condition.

  • Value2: enter the second value for the field search condition, if relevant depending on the operator you select.

Advanced settings

tStatCatcher Statistics

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

Global Variables 

NB_LINE: the number of rows processed. 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 usually used as a start component in a Talend flow and it requires an output component.

Log4j

If you are using a subscription-based version of the Studio, the activity of this component can be logged using the log4j feature. For more information on this feature, see Talend Studio User Guide.

For more information on the log4j logging levels, see the Apache documentation at http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html.

Scenario: Handling data with NetSuite

This scenario describes a Job that reads data from NetSuite, transforms the data and writes the transformed data to NetSuite, finally displays the transformed data on the console.

Adding the components

Create a new Job and add the following five components by typing their names in the design workspace or dropping them from the Palette:

  • two tNetsuiteInput components: reads the data that matches the specified search criteria from NetSuite.

  • a tMap component: transforms the data it receives from the preceding component and then sends the transformed data to the next component.

  • a tNetsuiteOutput component: writes the data it receives from the preceding component into NetSuite.

  • a tLogRow component: displays the data it receives from the preceding component on the console.

Configuring and linking the components

Transforming the data in NetSuite and writing the transformed data into NetSuite

  1. Double-click the first tNetsuiteInput to open its Basic settings view.

  2. In the Username, Password, Role, and Account fields, enter the information required for the connection to NetSuite.

    In the Record Type list, select Location to read the location type information from NetSuite.

  3. Click the [+] button below the Search Criteria table to add one row.

    Click the cell of the Field Name column and select internalId from the drop-down list.

    Click the cell of the Operator column and select List - Any Of from the drop-down list.

    In the cell of the Value column, enter java.util.Arrays.asList("1") to retrieve only the record whose internalId is set to 1.

  4. Connect the first tNetsuiteInput to tMap using a Row > Main connection.

  5. Double-click tNetsuiteOutput to open its Basic settings view.

  6. In the Username, Password, Role, and Account fields, enter the information required for the connection to NetSuite.

    In the Action list, select insert to insert the transformed data into NetSuite.

    In the Record Type list, select Location to write the location type information into NetSuite.

  7. Click the [...] button next to Edit schema to open the schema editor. You can see the schema has already been prefilled. Keep only the columns that are relevant to your operation and delete others. In this example, keep the column Name, Parent, IncludeChildren, IsInactive, TranPrefix, Logo, MakeInventoryAvailable, MakeInventoryAvailableStore, CustomFieldList, and ExternalId.

  8. Connect tMap to tNetsuiteOutput using a Row > *New Output* (Main) connection. In the pop-up dialog box, enter the name of the output connection, out in this example. Then click Yes to let tMap get the schema of the target component tNetsuiteOutput.

  9. Double-click tMap to open its Map Editor.

    In the out output table, set the value of the Name column by entering "Paris" in the corresponding Expression column field.

    Drag and drop the Parent column in the row1 input table onto the Expression column of the corresponding row in the out output table.

    Do the same to drag and drop other columns IncludeChildren, IsInactive, TranPrefix, Logo, MakeInventoryAvailable, MakeInventoryAvailableStore, CustomFieldList, and ExternalId in the row1 input table onto the Expression column of the corresponding row in the out output table.

Retrieving the transformed data from NetSuite

  1. Double-click the second tNetsuiteInput to open its Basic settings view.

  2. In the Username, Password, Role, and Account fields, enter the information required for the connection to NetSuite.

  3. In the Record Type list, select Location to read the location type information from NetSuite.

  4. Click the [+] button below the Search Criteria table to add one row.

    Click the cell of the Field Name column and select name from the drop-down list.

    Click the cell of the Operator column and select String - Contains from the drop-down list.

    In the cell of the Value column, enter Paris to retrieve only the record whose name contains Paris.

  5. Double-click tLogRow to open its Basic settings view.

  6. In the Mode area, select Vertical (each row is a key/value list) for better readability of the result.

  7. Connect the second tNetsuiteInput to tLogRow using a Row > Main connection.

  8. Connect the first tNetsuiteInput to the second tNetsuiteInput using a Trigger > OnSubjobOk connection.

Saving and executing the Job

  1. Press Ctrl + S to save the Job.

  2. Press F6 or click Run on the Run tab to run the Job.

    As shown above, the data has been transformed and written into NetSuite, then the transformed data is retrieved from NetSuite and displayed on the console.