tSAPBWInput
Executes an SQL query with a strictly defined order which must correspond to your
schema definition.
tSAPBWInput reads data from an SAP BW database using a
JDBC API connection and extracts fields based on an SQL query. Then it passes on the field
list to the next component via a Row > Main connection.
tSAPBWInput Standard properties
These properties are used to configure tSAPBWInput running in the Standard Job framework.
The Standard
tSAPBWInput component belongs to the Business family.
The component in this framework is available in all Talend
products.
Basic settings
Property type |
Either Built-in or Repository |
 |
Built-in: No property data stored |
 |
Repository: Select the repository |
Schema and Edit |
A schema is a row description. It defines the number of fields Click Edit
|
JDBC URL |
Enter the JDBC URL of the database you want to connect to. For |
Username |
Enter the username for DB access authentication. |
Password |
Enter the password for DB access authentication. To enter the password, click the […] button next to the |
Table Name |
Type in the name of the DB table. |
Query Type |
Either Built-in or Repository. |
 |
Built-in: No property data stored |
 |
Repository: Select the repository |
Guess Query |
Enter your DB query paying particularly attention to properly sequence |
Advanced settings
Trim all the String/Char columns |
Select this check box to remove leading and trailing whitespace from |
Trim column |
Remove leading and trailing whitespace from defined columns. Note:
Clear Trim all the String/Char |
tStatCatcher Statistics |
Select this check box to collect log data at the component |
Global Variables
Global Variables |
ERROR_MESSAGE: the error message generated by the A Flow variable functions during the execution of a component while an After variable To fill up a field or expression with a variable, press Ctrl + For further information about variables, see |
Usage
Usage rule |
This component supports SQL queries for SAP BW database using a JDBC |
Limitation |
Specific jar and dll files provided by SAP must be added to your
Studio and the workstation hosting your Studio. The exact procedure varies among platforms such as 32-bit or 64-bit Windows or Linux.
|
Reading data from SAP BW database
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:
-
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
-
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:
-
Set up the Job.
-
Set up the jdbc connection to the SAP BW server.
-
Set up a query.
-
Display the fetched data on the console.
Set up the Job
-
Drop a tSAPBWInput component and a
tLogRow component from the Palette onto the workspace. -
Connect the tSAPBWInput component and
the tLogRow component using a Row > Main
connection.
Set up the jdbc connection to the SAP BW server
-
Double-click the tSAPBWInput component to
open its Basic settings view and define the
component properties. -
Fill the JDBC URL field with the URL of
your jdbc4olap server.Note that the URL displayed above is for demonstration only. -
Fill the Username and Password fields with your username and password
for the DB access authentication. -
Click the three-dot button next to Edit
schema to define the schema to be used. -
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
-
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. -
Fill the Query area with the query
script. In this example, we use:123456"SELECTT1."[0D_CO_CODE].[LEVEL01]" AS company,T0."[Measures].[D68EEPGGHUMSZ92PIJARDZ0KA]" AS amountFROM"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
-
Double-click the tLogRow component to
open its Basic settings view and define the
component properties. -
Click Sync columns to retrieve the schema
defined in the preceding component. - Select Table in the Mode area.
-
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.