Hand-cranking a built-in schema
In this recipe, we are presented with a CSV file that does not have a heading row and needs to create a schema for the data. This is a basic recipe with which most readers should be familiar: however, it does provide a framework for discussion of some of the more important principles of Talend schemas.
The record we will be defining is as follows:
John Smith,27/11/1990,2012-01-10 10:24:54.953
As you can see this contains the fields; first name, last name, date of birth, timestamp, and age. Note that age is an empty string.
Getting ready
Open a new Talend Job (jo_cook_ch02_0000_handCrankedSchema
), so that the right-hand palette becomes available.
How to do it…
- Drag a
tFileInputDelimited
component from the palette, and open it by double clicking it. - Click the Edit Schema button (…), shown in the following screenshot, to open the schema editor:
- Click the + button to add a column:
- Type
name
into the column, and set the length to50
. - Click the + button three...