Scenario: Loading data to a table in the Ingres DBMS - 6.3

Talend Components Reference Guide

EnrichVersion
6.3
EnrichProdName
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for Data Quality
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

In this scenario, a tIngresOutputBulkExec component is deployed to prepare an output file with the employee data from a .csv file and then use that output file to feed a table in an Ingres database.

Dragging and dropping components

  1. Drop tIngresConnection, tFileInputDelimited and tIngresOutputBulkExec from the Palette onto the workspace.

  2. Rename tIngresOutputBulkExec as save_a_copy_and_load_to_DB.

  3. Link tIngresConnection to tFileInputDelimited using an OnSubjobOk trigger.

  4. Link tFileInputDelimited to tIngresOutputBulkExec using a Row > Main connection.

Configuring the components

  1. Double-click tIngresConnection to open its Basic settings view in the Component tab.

  2. In the Server field, enter the address of the server where the Ingres DBMS resides, for example "localhost".

    Keep the default settings of the Port field.

  3. In the Database field, enter the name of the Ingres database, for example "research".

  4. In the Username and Password fields, enter the authentication credentials.

    A context variable is used for the password here. For more information on context variables, see Talend Studio User Guide.

  5. Double-click tFileInputDelimited to open its Basic settings view in the Component tab.

  6. Select the source file by clicking the [...] button next to the File name/Stream field.

  7. Click the [...] button next to the Edit schema field to open the schema editor.

  8. Click the [+] button to add four columns, for example name, age, job and dept, with the data type as string, Integer, string and string respectively.

    Click OK to close the schema editor.

    Click Yes on the pop-up window that asks whether to propagate the changes to the subsequent component.

    Leave other default settings unchanged.

  9. Double-click tIngresOutputBulkExec to open its Basic settings view in the Component tab.

  10. In the Table field, enter the name of the table for data insertion.

  11. In the VNode and Database fields, enter the names of the VNode and the database.

  12. In the File Name field, enter the full path of the file that will hold the data of the source file.

Executing the Job

  1. Press Ctrl+S to save the Job.

  2. Press F6 to run the Job.

    As shown above, the employee data is written to the table employee in the database research on the node talendbj. Meanwhile, the output file employee_research.csv has been generated at C:/Users/talend/Desktop.