Scenario: Reading data from SAP BW database - 6.1

Talend Open Studio for Big Data Components Reference Guide

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

This scenario describes a two-component Job that reads data from an SAP BW database. The data is fetched and displayed on the console.

Prior to setting up the Job, make sure the following prerequisites are met:

  1. Copy the following .jar files which compose the jdbc4olap driver to your class path:

    -activation.jar

    -commons-codec.jar

    -jdbc4olap.jar

    -saaj-api.jar

    -saaj-impl.jar

  2. Make sure that you have the latest version of jdbc4olap driver. You can download the latest version of jdbc4olap driver from jdbc4olap download section. For further information about the usage of jdbc4olap driver, see jdbc4olap User Guide.

The procedure of this scenario requires 4 main steps detailed hereafter:

  1. Set up the Job.

  2. Set up the jdbc connection to the SAP BW server.

  3. Set up a query.

  4. Display the fetched data on the console.

Set up the Job

  1. Drop a tSAPBWInput component and a tLogRow component from the Palette onto the workspace.

  2. Connect the tSAPBWInput component and the tLogRow component using a Row > Main connection.

Set up the jdbc connection to the SAP BW server

  1. Double-click the tSAPBWInput component to open its Basic settings view and define the component properties.

  2. Fill the JDBC URL field with the URL of your jdbc4olap server.

    Note that the URL displayed above is for demonstration only.

  3. Fill the Username and Password fields with your username and password for the DB access authentication.

  4. Click the three-dot button next to Edit schema to define the schema to be used.

  5. Click the plus button to add new columns to the schema and set the data type for each column and click OK to save the schema settings.

Set up a query

  1. From the Basic settings view of tSAPBWInput, fill the Table Name field with the table name. In this scenario, table name "Measures" is for demonstration only.

  2. Fill the Query area with the query script. In this example, we use:

    "SELECT 
    T1.\"[0D_CO_CODE].[LEVEL01]\" AS company, 
    T0.\"[Measures].[D68EEPGGHUMSZ92PIJARDZ0KA]\" AS amount 
    FROM 
    \"0D_DECU\".\"0D_DECU/PRE_QRY4\".\"[Measures]\" T0, 
    \"0D_DECU\".\"0D_DECU/PRE_QRY4\".\"[0D_CO_CODE]\" T1 "

    Note

    Due to the limitations of the supported SQL queries, the query scripts you use must be based on the grammar defined in the jdbc4olap driver. For further information about this grammar, see jdbc4olap User Guide.

Display the fetched data on the console

  1. Double-click the tLogRow component to open its Basic settings view and define the component properties.

  2. Click Sync columns to retrieve the schema defined in the preceding component.

  3. Select Table in the Mode area.

  4. Press Ctrl+S to save your Job and press F6 to execute it.

    The data in the table "Measure" is fetched and displayed on the console.