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

This component retrieves data from an entity of a Microsoft CRM database.

Purpose

This component allows you to extract data from a Microsoft CRM database based on conditions set on specific columns.

tMicrosoftCrmInput Properties

Component family

Business / Microsoft CRM

Basic settings

Authentication Type

Select the authentication type that corresponds to your specific CRM deployment model.

  • ON_PREMISE: the CRM is installed in-house on the customer's own servers, and licensing is purchased along with any necessary infrastructure.

  • ONLINE: the customer accesses the CRM as part of a cloud-based subscription service, hosted by Microsoft in their data centers.

 

CRM Version

Select the version of the on-premise CRM database from the drop-down list, either CRM 2011 or CRM 2015.

 

API Version

Select the API version of the online CRM database from the drop-down list, either v2007 or v2011.

 

Microsoft WebService URL

Specify the webservice URL of an on-premise Microsoft CRM server.

This field is available only when ON_PREMISE is selected from the Authentication Type list and CRM 2011 is selected from the CRM Version list.

 

OrganizeName

Specify the name of the organization that needs to access the Microsoft CRM database.

This field is not available when ON_PREMISE is selected from the Authentication Type list and CRM 2015 is selected from the CRM Version list.

 

Username and Password

Specify the user authentication data required to access the Microsoft CRM database.

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.

 

Domain

Specify the domain name of the server on which the Microsoft CRM database is hosted.

This field is available only when ON_PREMISE is selected from the Authentication Type list and CRM 2011 is selected from the CRM Version list.

 

Host

Specify the IP address of the Microsoft CRM database server.

This field is available when:

  • ON_PREMISE is selected from the Authentication Type list and CRM 2011 is selected from the API Version list.

  • ONLINE is selected from the Authentication Type list and v2007 is selected from the API Version list.

 

Port

Specify the listening port number of the Microsoft CRM database server.

This field is available only when ON_PREMISE is selected from the Authentication Type list and CRM 2011 is selected from the CRM Version list.

 

Organization Wsdl URL

Specify the WSDL URL of the Organization Service.

This field is available only when ON_PREMISE is selected from the Authentication Type list and CRM 2015 is selected from the CRM Version list.

 

Security Service URL

Specify the URL of the Security Token Service.

This field is available only when ON_PREMISE is selected from the Authentication Type list and CRM 2015 is selected from the CRM Version list.

 

Trust Certificate

Specify the path to the Trust Certificate file.

This field is available only when ON_PREMISE is selected from the Authentication Type list and CRM 2015 is selected from the CRM Version list.

 

Discovery service endpoint

Specify the CRM online discovery service endpoint.

This field is available only when ONLINE is selected from the Authentication Type list and v2011 is selected from the API Version list.

 

Time out (second)

Specify the number of seconds to wait for a reply message from the CRM server before closing the connection to it.

 

Entity

Select the relevant entity from the list. If needed, select CustomEntity from the list, and then specify the entity name in the Custom Entity Name field displayed and define the schema for the custom entity.

 

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.

Note that the schema of this component is related to the specified entity.

 

Logical operator used to combine conditions

Select the logical operator used to combine the conditions defined in Conditions table. Two operators are available:

  • And: the record will be included in the result set when all of the conditions are met.

  • Or: the record will be included in the result set when any of the conditions is met.

 

Conditions

Click the [+] button to add as many conditions as needed. The following parameters need to be set for each condition:

  • Input column: Click in the cell and select the column of the input schema on which the condition is to be set.

  • Operator: Click in the cell and select the operator used to compare the value for the input colulmn with the value defined in the Value column. The values for this parameter are: Equal, NotEqual, GreaterThan, LessThan, GreaterEqual, LessEqual, and Like.

  • Value: Type in the value between quotes if needed.

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 read by an input component or transferred to an output component. 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 of a Job or Subjob and it always needs an output link.

Limitation

This component supports Microsoft CRM 2011 and 2015 for the On-Premise authentication type and Microsoft CRM 4.0 (2007) and 2011 for the Online authentication type.

Scenario: Writing data in a Microsoft CRM database and putting conditions on columns to extract specified rows

This scenario describes a four-component Job which aims at writing the data included in a delimited input file in a custom entity in a Microsoft CRM database. It then extracts specified rows to an output file using the conditions set on certain input columns.

Warning

If you want to write in a CustomEntity in Microsoft CRM database, make sure to name the columns in accordance with the naming rule set by Microsoft, that is "name_columnname" all in lower case.

Setting up the Job

  1. Drop the following components from the Palette to the design workspace: tFileInputDelimited, tFileOutputDelimited, tMicrosoftCrmInput, and tMicrosoftCrmOutput.

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

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

  4. Connect tFileInputDelimited to tMicrosoftCrmInput using Trigger > OnSubjobOk connection.

Configuring tFileInputDelimited

  1. Double-click tFileInputDelimited to display its Basic settings view and define its properties.

  2. Set the Property Type to Repository if you have stored the input file properties centrally in the Metadata node in the Repository tree view. Otherwise, select Built-In and fill the fields that follow manually. In this example, property is set to Built-In.

  3. Click the three-dot button next to the File name/Stream field and browse to the delimited file that holds the input data. The input file in this example contains the following columns: new_id, new_status, new_firstname, new_email, new_city, new_initial and new_zipcode.

  4. In the Basic settings view, define the Row Separator allowing to identify the end of a row. Then define the Field Separator used to delimit fields in a row.

  5. If needed, define the header, footer and limit number of processed rows in the corresponding fields. In this example, the header, footer and limits are not set.

  6. Click Edit schema to open a dialog box where you can define the input schema you want to write in Microsoft CRM database.

  7. Click OK to close the dialog box.

Configuring tMicrosoftCrmOutput

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

  2. Enter the Microsoft Web Service URL as well as the user name and password in the corresponding fields.

  3. In the OrganizeName field, enter the name that is given the right to access the Microsoft CRM database.

  4. In the Domain field, enter the domain name of the server on which Microsoft CRM is hosted, and then enter the host IP address and the listening port number in the corresponding fields.

  5. In the Action list, select the operation you want to carry on. In this example, we want to insert data in a custom entity in Microsoft Crm.

  6. In the Time out field, set the amount of time (in seconds) after which the Job will time out.

  7. In the Entity list, select one among those offered. In this example, CustomEntity is selected.

    Note

    If CustomEntity is selected, a Custom Entity Name field displays where you need to enter a name for the custom entity.

    The Schema is then automatically set according to the entity selected. If needed, click Edit schema to display a dialog box where you can modify this schema and remove the columns that you do not need in the output.

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