This scenario describes a Job that writes data generated by a tRowGenerator component into a file and then bulk-loads the data from the file to a Sybase IQ 12 database.
Create a new Job and add a tRowGenerator component and a tSybaseIQOutputBulkExec component by typing their names in the design workspace or dropping them from the Palette.
Link the tRowGenerator component to the tSybaseIQOutputBulkExec component using a Row > Main connection.
Double-click the tRowGenerator component to open its RowGenerator Editor.
Click the [+] button to add two columns and set their properties:
id, Integer type, using Numeric.sequence(String,int,int) from the Functions list to generate sequence numbers.
name, String type, using TalendDataGenerator.getFirstName() from the Functions list to generate random first names.
In the Number of Rows for RowGenerator field, enter the number of rows to be generated. In this example, keep the default value 100.
Click OK to close the editor and in the pop-up dialog box click Yes to propagate the schema to the next component.
Double-click the tSybaseIQOutputBulkExec component to open its Basic settings view.
In the Host, Port, Database, Username and Password fields, enter the information required to access the Sybase IQ 12 database.
In the Table field, enter the name of the table into which the data will be writen. In this example, it is staff.
In the Action on table list, select Create table if not exists.
In the Filename field, enter the full path of the file to hold the data.