tMarketoOutput - 6.3

Talend Open Studio for Big Data Components Reference Guide

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

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.

tMarketoOutput Properties

Component family

Business/Cloud

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.

  • 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.

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.

 

Endpoint address

Enter the API Endpoint URL of the Marketo Web server.

 

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 REST API mode and the SOAP 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.

This operation list is available only when the De-duplicate lead record on email address check box is cleared in the REST API mode.

 

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 when:

  • the REST API mode is selected.

  • syncMultipleLeads is selected from the Operation list in the SOAP API mode, or

 

LookupField name

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

This list is available when the REST API mode is selected and the De-duplicate lead record on email address check box is cleared.

 

Batch Size

Enter the maximum batch size in synchronizing lead data in batch.

This field is available only when syncMultipleLeads is selected 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

API Mode

Select the Marketo API mode, either REST API (default) or SOAP API.

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

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

 

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_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 usually used as an end component of a Job or Subjob and it always needs an input link.

Limitation

n/a

Scenario: Data transmission between the Marketo database and an external system using REST API

The following scenario describes a four-component Job that inserts several lead records into the Marketo database, then retrieves these records from the Marketo database and displays them on the console.

Setting up the Job

  1. Add two tFixedFlowInput components, a tMarketoOutput component, a tMarketoInput component, and a tLogRow component by typing their names on the design workspace or dropping them from the Palette.

  2. Double-click the tMarketoOutput component to open its Basic settings view and in the API Mode area make sure the REST API mode is selected.

  3. Do the same to make sure the REST API mode is also selected in the API Mode area on the Basic settings view of the tMarketoInput component.

  4. Connect the first tFixedFlowInput component to the tMarketoOutput component using a Row > Main connection. In the pop-up dialog box, click Yes so that the first tFixedFlowInput component can get the schema from the target tMarketoOutput component.

  5. Connect the second tFixedFlowInput component to the tMarketoInput component using a Row > Main connection. In the pop-up dialog box, click No and the second tFixedFlowInput component will not get the schema from the target tMarketoInput component.

  6. Connect the tMarketoInput component to the tLogRow component using a Row > Main connection.

  7. Connect the first tFixedFlowInput component to the second tFixedFlowInput component using a Trigger > On Subjob Ok connection.

Inserting lead records into Marketo

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

  2. Click the [...] button next to Edit schema to open the schema dialog box.

  3. In the schema dialog box, select the id and Status columns that don't need input values and click the [x] button to remove them.

    Then click OK to save the settings and close the schema dialog box.

  4. In the Mode area, select Use Inline Content(delimited file) and enter the following input data in the Content field.

    dev@talend.com;Peter;Wang
    doc@talend.com;Judy;Zhang
    dev@talend.com;Nick;Liu
    dev@talend.com;Mark;Zhao
    doc@talend.com;Alex;Sun
  5. Double-click the tMarketoOutput component to open its Basic settings view.

  6. In the Endpoint address field, enter the REST API endpoint URL that can be found on the Marketo Admin -> Web Services panel.

    In the Client Access ID and Secret key fields, enter the user ID and encryption key required to access Marketo.

  7. From the Operation list, select SyncMultipleLeads to insert multiple lead records, and from the list displayed, select createDuplicate to allow duplicated leads to be created.

Retrieving lead records from Marketo

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

  2. Click the [...] button next to Edit schema and in the schema dialog box displayed, define the schema by adding one column mail of String type.

    Then click OK to save the changes and close the schema dialog box.

  3. In the Mode area, select Use Inline Table. Then click the [+] button twice below the table displayed to add two rows and fill each row with respective values. In this example, two email values dev@talend.com and doc@talend.com are added so that the lead records identified by these email values can be retrieved.

  4. Double-click the tMarketoInput component to open its Basic settings view.

  5. In the Endpoint address field, enter the REST API endpoint URL that can be found on the Marketo Admin -> Web Services panel.

    In the Client Access ID and Secret key fields, enter the user ID and encryption key required to access Marketo.

  6. Select getMultipleLeads from the Operation list to retrieve a batch of lead records.

    Then select LeadKeySelector from the Lead Selector list, and select email from the LeadKey type list and mail from the LeadKey values list to retrieve the leads identified by the email values passed from the second tFixedFlowInput component.

  7. Double-click the tLogRow component to open its Basic settings view.

  8. In the Mode area, select Table (print values in cells of a table) for better readability of the result.

Saving and executing the Job

  1. Press Ctrl + S to save the Job.

  2. Press F6 to execute the Job.