Configuring the components

Scenario 1: Using context parameters when reading a table from an Oracle database

EnrichVersion
Cloud
6.4
task
Design and Development > Third-party systems > Database components > Oracle components
Data Quality and Preparation > Third-party systems > Database components > Oracle components
Data Governance > Third-party systems > Database components > Oracle components
EnrichPlatform
Talend Studio

Procedure

  1. Double-click tOracleInput to open its Basic Settings view in the Component tab.
  2. Select a connection type from the Connection Type drop-down list. In this example, it is Oracle SID.
    Select the version of the Oracle database to be used from the DB Version drop-down list. In this example, it is Oracle 12-7.
    In the Host field, enter the Oracle database server's IP address. In this example, it is 192.168.31.32.
    In the Database field, enter the database name. In this example, it is TALEND.
    In the Oracle schema field, enter the Oracle schema name. In this example, it is TALEND.
    In the Username and Password fields, enter the authentication details.
  3. Click the [...] button next to Edit schema to open the schema editor.
  4. Click the [+] button to add four columns: ID and AGE of the integer type, NAME and SEX of the string type.
    Click OK to close the schema editor and accept the propagation prompted by the pop-up dialog box.
  5. Put the cursor in the Table Name field and press F5 for context parameter setting. The dialog box [New Context Parameter] pops up.
    For more information about context settings, see Talend Studio User Guide.
  6. In the Name field, enter the context parameter name. In this example, it is TABLE.
    In the Default value field, enter the name of the Oracle database table to be queried. In this example, it is PERSON.
  7. Click Finish to validate the setting.
    The context parameter context.TABLE automatically appears in the Table Name field.
  8. In the Query Type list, select Built-In. Then, click Guess Query to get the query statement.
    "SELECT 
      "+context.TABLE+".\"ID\", 
      "+context.TABLE+".NAME, 
      "+context.TABLE+".SEX, 
      "+context.TABLE+".AGE
    FROM "+context.TABLE
  9. Double-click tLogRow to open its Basic settings view in the Component tab.
  10. In the Mode area, select Table (print values in cells of a table) for a better display of the results.