August 17, 2023

tFileOutputLDIF – Docs for ESB 5.x



tFileOutputLDIF Properties

Component family




tFileOutputLDIF outputs data to
an LDIF type of file which can then be loaded into a LDAP


tFileOutputLDIF writes or
modifies a LDIF file with data separated in respective entries based
on the schema defined,.or else deletes content from an LDIF file.

Basic settings

File name

Name or path to the output file and/or the variable to be used.

For further information about how to define and use a variable in
a Job, see Talend Studio
User Guide.



Wraps the file content, every defined number of characters.


Change type

Select Add, Modify or Delete to
respectively create an LDIF file, modify or remove an existing LDIF
file. In case of modification, set the type of attribute changes to
be made.


Schema and Edit

A schema is a row description, it defines the number of fields to be processed and
passed on to the next component. The schema is either Built-in or stored remotely in the

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

  • 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

  • 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



Built-in: The schema will be
created and stored locally for this component only. Related topic:
see Talend Studio User Guide.



Repository: The schema already
exists and is stored in the Repository, hence can be reused in
various projects and Job designs. Related topic: see
Talend Studio User


Sync columns

Click to synchronize the output file schema with the input file
schema. The Sync function only displays once the Row connection is
linked with the Output component.



Select this check box to add the new rows at the end of the

Advanced settings

Create directory if not exists

This check box is selected by default. It creates the directory
that holds the output delimited file, if it does not already


Custom the flush buffer size

Select this check box to define the number of lines to write
before emptying the buffer.

Row Number: set the number of lines
to write.



Select the encoding from the list or select Custom and define it manually. This field is
compulsory for DB data handling.


Don’t generate empty file

Select this check box if you do not want to generate empty


tStatCatcher Statistics

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

Dynamic settings

Click the [+] button to add a row in the table and fill the
Code field with a context variable to choose your HDFS
connection dynamically from multiple connections planned in your Job. This feature is useful
when you need to access files in different HDFS systems or different distributions,
especially when you are working in an environment where you cannot change your Job settings,
for example, when your Job has to be deployed and executed independent of Talend Studio.

The Dynamic settings table is available only when the
Use an existing connection check box is selected in the
Basic settings view. Once a dynamic parameter is
defined, the Component List box in the Basic settings view becomes unusable.

For more information on Dynamic settings and context
variables, see Talend Studio User Guide.

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

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 +
to access the variable list and choose the variable to use from it.

For further information about variables, see Talend Studio
User Guide.


Use this component to write an XML file with data passed on from
other components using a Row link.


Due to license incompatibility, one or more JARs required to use this component are not
provided. You can install the missing JARs for this particular component by clicking the
Install button on the Component tab view. You can also find out and add all missing JARs easily on
the Modules tab in the Integration perspective
of your studio. For details, see
or the section describing how to configure the Studio in the Talend Installation and Upgrade

Scenario: Writing DB data into an LDIF-type file

This scenario describes a two component Job which aims at extracting data from a
database table and writing this data into a new output LDIF file.


Dropping and linking components

  1. Drop a tMysqlInput component and a
    tFileOutputLDIF component from the
    Palette to the design area.

  2. Connect the components together using a Row >

Configuring the components

  1. Select the tMysqlInput component, and go
    to the Component panel then select the
    Basic settings tab.

  2. If you stored the DB connection details in a Metadata entry in the Repository, set the Property type as well as the Schema type on Repository and select the relevant metadata entry. All other
    fields are filled in automatically, and retrieve the metadata-stored

  3. Alternatively select Built-in as the
    Property type and Schema type and define the DB connection and schema

  4. Then double-click on tFileOutpuLDIF and
    define the Basic settings.

  5. Browse to the folder where you store the Output file. In this use case, a
    new LDIF file is to be created. Thus type in the name of this new

  6. In the Wrap field, enter the number of
    characters held on one line. The text coming afterwards will get wrapped
    onto the next line.

  7. Select Add as Change Type as the newly created file is by definition
    empty. In case of modification type of Change, you’ll need to define the
    nature of the modification you want to make to the file.

  8. As the Schema type, select Built-in and use the Sync
    button to retrieve the input schema

Saving and executing the Job

  1. Press Ctrl+S to save your Job.

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


    The LDIF file created contains the data from the DB table and the type of
    change made to the file, in this use case, addition.

Document get from Talend
Thank you for watching.
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x