Procedure
-
Double-click the tRowGenerator component
to open the Row Generator editor.
-
Click the [+] button to add four columns
and set their properties:
-
id, type Integer, 2 characters long.
-
firstName, type String, 15 characters long
-
lastName, type String, 15 characters long
-
city, type String, 15 characters long
-
-
Define the function for each column:
-
For the id column, select Numeric.sequence from the Function list to generate sequence numbers.
-
For the firstName column, select TalendDataGenerator.getFirstName from the Function list to generate random first names.
-
For the lastName column, select TalendDataGenerator.getLastName from the Function list to generate random family names.
-
For the city column, select TalendDataGenerator.getUsCity from the Function list to generate random city names.
-
- In the Number of Rows for RowGenerator field, specify the number of data rows you want to generate, 10 in this example.
- Click the Preview button on the Preview tab to validate the generator settings.
- When done, click OK to close the editor and click Yes when prompted to propagate the schema to the next component.