Sorting a file in Talend Studio
In this tutorial, learn how to use a tSortRow component to sort data from a file with Talend Studio.
This tutorial makes use of a .csv file. If you do not have a
.csv file, click the
Downloads tab and save customers_unordered.csv.
Creating a Talend Studio project
Creating a project is the first step to using Talend Studio. Projects allow you to better organize your work.
Procedure
Results
Creating a Job to sort a delimited file
Talend Studio projects contain Jobs. In Jobs, you can build workflows through components, which allow you to complete specific actions.
Before you begin
Procedure
Results
Configuring a component to read a delimited file
Talend Studio components allow you to complete specific actions. You can add them to Jobs. You can use the tFileInputDelimited component to read a delimited file, for example.
Before you begin
Procedure
- Click inside the Designer.
- Enter tFileInputDelimited and select the component of the same name.
-
In the Designer, double-click the
tFileInputDelimited component.
Results
Defining a component schema to read a delimited file
Defining the component schema of your delimited file helps you parse the data you are working with.
Before you begin
Procedure
Results
Sorting your data
Through the tSortRow component, Talend Studio allows you to sort your data.
Sorting a delimited file
You can sort a file delimited file with a link to a tSortRow component. The tSortRow component sorts input data based on one or several columns of data, by sort type or order, for example.
Before you begin
- You must have added and configured a tFileInputDelimited component (see Configuring a component to read a delimited file).
- You must also have defined its schema (see Defining a component schema to read a delimited file).
Procedure
Results
Displaying the results of sorting a delimited file
You can display the result of a workflow with a link to a tLogRow component. The tLogRow component displays data in the Run console.
Before you begin
- You must have added and configured a tFileInputDelimited component (see Configuring a component to read a delimited file).
- You must have defined its schema (see Defining a component schema to read a delimited file).
- You must have sorted its data (see Sorting a delimited file).
Procedure
- In the Designer, add a tLogRow component.
-
Right-click the tSortRow component.