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

tLDAPOutput Properties

Component family

Databases/LDAP

 

Function

tLDAPOutput writes into an LDAP directory.

Purpose

tLDAPOutput executes an LDAP query based on the given filter and corresponding to the schema definition. Then it passes on the field list to the next component via a Main row link.

Basic settings

Property type

Either Built-in or Repository.

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

 

 

Built-in: No property data stored centrally.

 

 

Repository: Select the repository file in which the properties are stored. The fields that follow are completed automatically using the data retrieved.

 

Click this icon to open a database connection wizard and store the database connection parameters you set in the component Basic settings view.

For more information about setting up and storing database connection parameters, see Talend Studio User Guide.

 

Use an existing connection

Select this check box and in the Component List click the relevant connection component to reuse the connection details you already defined.

Note

When a Job contains the parent Job and the child Job, Component List presents only the connection components in the same Job level.

 

Host

LDAP Directory server IP address.

 

Port

Listening port number of server.

 

Base DN

Path to user's authorized tree leaf.

 

Protocol

Select the protocol type on the list.

LDAP : no encryption is used

LDAPS: secured LDAP. When this option is chosen, the Advanced CA check box appears. Once selected, the advanced mode allows you to specify the directory and the keystore password of the certificate file for storing a specific CA. However, you can still deactivate this certificate validation by selecting the Trust all certs check box.

TLS: certificate is used When this option is chosen, the Advanced CA check box appears and is used the same way as that of the LDAPS type.

 

User and Password

Fill in the User and Password as required by the directory

Note that the login must match the LDAP syntax requirement to be valid. e.g.: "cn=Directory Manager".

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.

 

Multi valued field separator

Type in the value separator in multi-value fields.

 

Alias dereferencing

Select the option on the list. Never improves search performance if you are sure that no aliases is to be dereferenced. By default, Always is to be used:

Always: Always dereference aliases

Never: Never dereferences aliases.

Searching:Dereferences aliases only after name resolution.

Finding: Dereferences aliases only during name resolution

 

Referral handling

Select the option on the list:

Ignore: does not handle request redirections

Follow:does handle request redirections

 

Insert mode

Select the editing mode on the list:

Add: add a value in a multi-value attribute,

Insert: insert new data,

Update: updates the existing data,

Delete: remove the selected data from the directory,

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

Warning

When Update is selected, you must go to the Advanced settings view, and select the Use Attribute Options (for update mode) check box to show the Attribute Options table. Then, select the attribute to update under the Attribute name part and the choose Replace under the Option part.

 

DN Column Name

Select in the list the type of the LDAP input entity used.

 

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.

When the schema to be reused has default values that are integers or functions, ensure that these default values are not enclosed within quotation marks. If they are, you must remove the quotation marks manually.

For more details, see https://help.talend.com/display/KB/Verifying+default+values+in+a+retrieved+schema.

  

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

Advanced settings

Use Attribute Options (for update mode)

Select this check box to choose the desired attribute (including dn, dc, ou, objectClass, mail and uid) and the corresponding operation (including Add, Replace, Remove Attribute and Remove Value).

 

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 processed. 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 covers all possible LDAP queries.

Note: Press Ctrl + Space bar to access the global variable list, including the GetResultName variable to retrieve the relevant DN Base automatically. This component allows you to carry out actions on a table or on the data of a table in an database. It also allows you to create a reject flow using a Row > Rejects link to filter data in error. For an example of tMySqlOutput in use, see Scenario 3: Retrieve data in error with a Reject link.

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: Editing data in a LDAP directory

Note

All of the database output components have the Parallelize option in their Advanced settings tab. This option allows you to improve data processing performances by handling several data flows simultaneously. For more information, see Talend Studio User Guide.

The following scenario describes a Job that reads an LDAP directory, updates the email of a selected entry and displays the output before writing the LDAP directory. To keep it simple, no alias dereferencing nor referral handling is performed. This scenario is based on Scenario: Displaying LDAP directory's filtered content. The result returned was a single entry, related to an organisational person, whom email is to be updated.

The output shows the following fields: dn, uid and mail as defined in the Job.

Dropping the components

  1. Drop the tLDAPInput, tLDAPOutput, tMap and tLogRow components from the Palette to the design workspace.

  2. Link tLDAPInput to tMap using the Row > Main connection.

  3. Link tMap to tLogRow using the Row > Main connection.

  4. Link tLogRow to tLDAPOutput using the Row > Main connection.

Configuring the components

  1. In the tLDAPInput Component view, set the connection details to the LDAP directory server as well as the filter as described in Scenario: Displaying LDAP directory's filtered content.

    Change the schema to make it simpler, by removing the unused fields: dc, ou, objectclass.

  2. Then open the mapper to set the edit to be carried out.

    Drag & drop the uid column from the input table to the output as no change is required on this column.

  3. In the Expression field of the dn column (output), fill in with the exact expression expected by the LDAP server to reach the target tree leaf and allow directory writing on the condition that you haven't set it already in the Base DN field of the tLDAPOutput component.

  4. In this use case, the GetResultName global variable is used to retrieve this path automatically. Press Ctrl+Space bar to access the variable list and select tLDAPInput_1_RESULT_NAME.

  5. In the mail column's expression field, type in the new email that will overwrite the current data in the LDAP directory. In this example, we change to Pierre.Dupont@talend.com.

    Click OK to validate the changes.

  6. Then select the tLDAPOutput component to set the directory writing properties.

  7. Set the Port and Host details manually if they aren't stored in the Repository.

  8. In Base DN field, set the highest tree leaf you have the rights to access. If you have not set previously the exact and full path of the target DN you want to access, then fill in it here. In this use case, the full DN is provided by the dn output from the tMap component, therefore only the highest accessible leaf is given: o=directoryRoot.

  9. Select the relevant protocol to be used: LDAP for this example.

    Fill in the User and Password as expected by the LDAP directory.

    Fill in Multi-valued field separator with a comma as some fields may hold more than one value, separated by a comma.

  10. Use the default setting of Alias Dereferencing and Referral Handling fields, respectively Always and Ignore.

    The Insert mode for this use case is Update (the email address).

    The schema was provided by the previous component through the propagation operation.

  11. In the Advanced settings view, select the Use Attribute Options (for update mode) check box to show the Attribute Options table.

    Select the attribute mail under the Attribute Name part and the choose Replace under the Option part.

Executing the Job

  1. Press Ctrl+S to save the Job.

  2. Press F6 to run the Job.