tMarketoOutput - 6.1

Talend Open Studio for Big Data Components Reference Guide

EnrichVersion
6.1
EnrichProdName
Talend Open Studio for Big Data
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

tMarketoOutput Properties

Component family

Business/Cloud

 

Function

The tMarketoOutput component outputs data to a Marketo Web server.

Purpose

The tMarketoOutput component allows you to write data into a Marketo DB on a Web server.

Basic settings

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.

Click Sync columns to retrieve the schema from the previous component connected in the Job.

 

 

Built-in: No property data is stored centrally.

 

 

Repository: Select the Repository file where Properties are stored.

 

API Mode

Select the Marketo API mode, either SOAP API or REST API.

For more information about Marketo SOAP API, see http://developers.marketo.com/documentation/soap/.

For more information about Marketo REST API, see http://developers.marketo.com/documentation/rest/.

 

Endpoint address

The URL of the Marketo Web server for the SOAP API calls to.

 

Secret key

Encrypted authentication code assigned by Marketo.

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

Note

Contact Marketo Support via to get this information.

 

Client Access ID

A user ID for the access to Marketo web service.

Note

Contact Marketo Support via to get this information.

 

Operation

Select an operation that allows you to synchronize lead data between Marketo and another external system.

The operation supported in both the SOAP API mode and the REST API mode:

  • syncLead: requests an insert or update operation for a lead record.

  • syncMultipleLeads: requests an insert or update operation for multiple lead records in batch.

The operation supported only in the REST API mode:

  • createOnly: creates new leads within Marketo.

  • updateOnly: updates existing leads in Marketo.

  • createOrUpdate: creates new leads within Marketo, or updates the leads if they already exist.

  • createDuplicate: creates new leads within Marketo. If they already exist, then creates duplicated leads.

 

Columns Mapping

Specify the corresponding columns in Marketo for the columns listed in the Column fields. By default, column names in the Column fields are the same as in the schema. You can change the mapping columns by editing the schema.

This table is available only in the SOAP API mode.

Note that the following two columns are read-only and you cannot map them to Marketo columns:

  • Status: the execution status of the current operation for the data record.

  • ERROR_MSG: the error message generated when an error occurs.

Note

Because some column names in the Marketo database may contain white space, which is not allowed in the component schema, you need to specify the corresponding column fields in the Columns in Marketo field. There is no need to map those schema columns which have the same name as in the Marketo database.

 

De-duplicate lead record on email address

Select this check box to de-duplicate and update lead records using email address.

Clear this check box to create another lead which contains the same email address.

This check box is available only when syncMultipleLeads is selected from the Operation list in the SOAP API mode.

 

LookupField name

Select the name of the lookupField attribute that will be used to find the duplicate.

This list is available only in the REST API mode.

 

Batch Size

The maximum batch size in synchronizing lead data in batch.

Note

This field will be displayed only when you select syncMultipleLeads from the Operation list.

 

Timeout (milliseconds)

Type in the query timeout (in milliseconds) on the Marketo Web service.

Note

The Job will stop when Timeout exception error occurs.

 

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 > Reject connection.

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_CALL: the number of calls. 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, it requires an input component.

Limitation

n/a

Scenario: Data transmission between Marketo DB and an external system

The following scenario describes a five-component Job that inserts Lead records into Marketo database and retrieves these records from Marketo database to a local file. Upon completing the data accessing, the Job displays the number of relevant API calls on the Run console.

Setting up the Job

  1. Drop tMarketoOutput, tMarketoInput, tFileInputDelimited, tFileOutputDelimited and tJava from the Palette onto the design workspace.

  2. Connect tFileInputDelimited to tMarketoOutput using a Row > Main connection.

  3. Connect tMarketoInput to tFileOutputDelimited using a Row > Main connection.

  4. Connect tFileInputDelimited to tMarketoInput using a Trigger > OnSubjectOk connection.

  5. Connect tMarketoInput to tJava using a Trigger > OnSubjectOk connection.

Configuring tFileInputDelimited

  1. Double-click tFileInputDelimited to define the component properties in its Basic settings view.

  2. Click the [...] button next to the File name/Stream field to select the source file for data insertion. In this example, it is D:/SendData.csv.

  3. Click the [...] button next to Edit schema to set the schema manually.

  4. Click the [+] button to add four columns: Id, Email, ForeignSysPersonId and ForeignSysType. Set the Type of Id to Integer and keep the rest as default. Then click OK to save the settings.

  5. Type in 1 in the Header field and keep the other settings as default.

Configuring tMarketoOutput

  1. Double-click tMarketoOutput to define the component properties in its Basic settings view.

  2. Click the Sync columns button to retrieve the schema defined in tFileInputDelimited and fill the Endpoint address field with the URL of the Marketo Web server. In this example, it is https://na-c.marketo.com/soap/demo/demo1.

    Note that the URL used in this scenario is for demonstration purposes only.

  3. Fill the Secret key field with encrypted authentication code assigned by Marketo. In this example, it is 1234567894DEMOONLY987654321.

  4. Fill the Client Access ID field with the user ID. In this example, it is mktodemo1_1234567894DEMOONLY987654321.

  5. Select syncMultipleLeads from the Operation list and type in the limit of query timeout in the Timeout field. In this example, use the default number: 600000.

Configuring tMarketoInput

  1. Double-click tMarketoInput to define the component properties in its Basic settings view.

  2. From the Operation list, select getLead.

  3. In Columns Mapping area, type in test@talend.com in Columns in Marketo column to set the Email column.

    Note that all the data used in this scenario is for demonstration purposes only.

  4. From the LeadKey type list, select EMAIL and fill the LeadKey value field with test@talend.com.

  5. Keep the rest of the settings as the corresponding settings in tMarketoOutput.

Configuring tFileOutputDelimited

  1. Double-click tFileOutputDelimited to define the component properties in its Basic settings view.

  2. Click the [...] button next to the File name field to synchronize data to a local file. In this example, it is D:/ReceiveData.csv.

  3. Click the Sync columns button and keep the rest of the settings as default.

Using Java scripts to count API calls

  1. Double-click tJava to add code in its Basic settings view.

  2. In the Code field, type in following code to count the number of API calls throughout the data operations:

    System.out.println(("The Number of API calls for inserting
    data to Marketo DB is:"));
    System.out.println((Integer)globalMap.get("tMarketoOutput_1_NB_CALL"));
    System.out.println(("The Number of API calls for data synchronization
    from Marketo DB is:"));
    System.out.println((Integer)globalMap.get("tMarketoInput_1_NB_CALL"));

Job execution

  1. Save your Job.

  2. Press F6 to execute it.

    The inserted lead records in the Marketo DB are synchronized to D:/ReceiveData.csv.

    The number of API calls throughout each data operation is displayed on the Run console.