Scenario: Bulk-loading data to a Sybase IQ 12 database - 6.3

Talend Open Studio for Big Data Components Reference Guide

EnrichVersion
6.3
EnrichProdName
Talend Open Studio for Big Data
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

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.

Adding and linking the components

  1. 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.

  2. Link the tRowGenerator component to the tSybaseIQOutputBulkExec component using a Row > Main connection.

Configuring the components

  1. Double-click the tRowGenerator component to open its RowGenerator Editor.

  2. 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.

  3. In the Number of Rows for RowGenerator field, enter the number of rows to be generated. In this example, keep the default value 100.

  4. Click OK to close the editor and in the pop-up dialog box click Yes to propagate the schema to the next component.

  5. Double-click the tSybaseIQOutputBulkExec component to open its Basic settings view.

  6. In the Host, Port, Database, Username and Password fields, enter the information required to access the Sybase IQ 12 database.

  7. In the Table field, enter the name of the table into which the data will be writen. In this example, it is staff.

  8. In the Action on table list, select Create table if not exists.

  9. In the Filename field, enter the full path of the file to hold the data.

Saving and executing the Job

  1. Press Ctrl+S to save the Job.

  2. Press F6 to run the Job.

  3. In the Sybase Central console, open the table staff to check the data:

    As shown above, the table is created with data inserted.