August 15, 2023

Scenario 2: Sorting entries based on dynamic schema – Docs for ESB 6.x

Scenario 2: Sorting entries based on dynamic schema

This scenario applies only to a subscription-based Talend solution.

In this scenario we will sort entries in an input file based on a dynamic schema,
display the sorting result on the Run console, and save
the sorting result in an output file. For more information about the dynamic schema
feature, see
Talend Studio User

  • Drop the components required for this use case: tFileInputDelimited, tSortRow,
    tLogRow and tFileOutputDelimited from the Palette to the design workspace.

  • Connect these components together using Row
    > Main links.

  • Double-click the tFileInputDelimited
    component to display its Basic settings view.


The dynamic schema feature is only supported in Built-In mode and requires the input file to have a
header row.

  • Select Built-In from the Property Type list.

  • Click the […] button next to the File Name field to browse to your input file. In this
    use case, the input file cars.csv has five columns:
    ID_Owner, Registration,
    Make, Color, and

  • Specify the header row in Header field. In
    this use case the first row is the header row.

  • Select Built-In from the Schema list, and click Edit
    to set the input schema.


The dynamic column must be defined in the last row of the

  • In the schema editor, add two columns and name them
    ID_Owner and Other respectively.
    Set the data type of the Other column to Dynamic to retrieve all the columns undefined in the

  • Click OK to propagate the schema and close
    the schema editor.

  • Double-click tSortRow to display the
    Basic settings view.

  • Add a row in the Criteria table by clicking
    the plus button, select Other under Schema column, select alpha as the sorting
    type, and select the ascending or
    descending order for data output.


Dynamic column sorting works only when the sorting type is
set to alpha.

  • To view the output in the form of a table on the Run console, double-click the tLogRow component and select the Table option in the Basic

  • Double-click the tFileOutputDelimited
    component to display its Basic Settings

  • Click the […] button next to the File Name field to browse to the directory where you
    want to save the output file, and then enter a name for the file.

  • Select the Include Header check box to
    retrieve the column names as well as the sorted data.

  • Save your Job and press F6 to run it.

    The sorting result is displayed on the Run
    console and written into the output file.


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