40
What would you do if you knew? Teradata ® Analytics for SAP ® Solutions Decoder Installation Guide TERADATA CONFIDENTIAL AND TRADE SECRET FOR TERADATA USE ONLY

Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Embed Size (px)

Citation preview

Page 1: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

What would you do if you knew? ™

Teradata® Analytics for SAP® Solutions

Decoder Installation Guide

TERADATA CONFIDENTIAL AND TRADE SECRET FOR TERADATA USE ONLY

Page 2: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

FOR TERADATA USE ONLY

Page 3: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4 3

FOR TERADATA USE ONLY

PREFACE

Preface

Purpose The purpose of this document is to provide guidance for the installation process of the decoding functions on a Teradata database. This is part of the Teradata® Analytics for SAP® Solutions installation.

Decluster functions are used to decode some SAP tables that are stored in an encoded format in the SAP underlying database. These are known as “Cluster Tables.”

In addition to Cluster Tables SAP uses “Pool Tables” that use a different encoding logic. The TAS_PoolBLOBDecode function is used to make this data available using Views.

SAP recognizes three main table types: Transparent, Cluster, and Pool tables. Transparent Tables are directly stored in the database. Cluster and Pool tables are stored in encoded format. Typically many small configuration tables are stored as a Pool table inside a large single database table. This limits the total number of tables in the RDBMS system. Cluster tables are grouped by primary key and stored in a single database table, using binary encoding for the actual data portion. Pool tables use a two field database table. The first field, VARKEY, has the full key as a composite value, and the second field, VARDATA, holds the remainder fields stored in a composite way.

The installation for cluster decoding produces a set of functions specific for the SAP installation at hand. For each output cluster table a specific (Teradata Decoder) function is generated to make cluster table data accessible without using the SAP application layer.

For Pool tables second decoder (function) needs to be installed. During install the installer will generate views for the requested Pool tables

All decoder functions are written in C++ and are compiled during installation.

Page 4: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Preface

4 Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4

FOR TERADATA USE ONLY

Audience This guide is intended for the sole use of installation, service, and support personnel of Teradata Corporation and its affiliates [and authorized installation, service, and support contractors]. Do not distribute or disclose to others without the written consent of a Teradata officer and a written confidentiality agreement with the recipient.

Revision History

Date and Release Description

May 2016 2.4

Updated to reflect version 2.4 and the separation of the Pool and Cluster decoder.

Page 5: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Teradata® Analytics for SAP® Solutions Decoder Installation Guide Release 2.4 5

FOR TERADATA USE ONLY

Additional Information

Related Documents

Documents are located at Teradata Service Documentation Library.

Title PID

Teradata® Analytics for SAP® Solutions SAP® Database Installation Guide

B035-3500

Teradata® Analytics for SAP® Solutions SAP® Data Services Installation Guide

B035-3501

Teradata® Analytics for SAP® Solutions Informatica PowerCenter Installation Guide

B035-3502

Teradata® Analytics for SAP® Solutions SAP® BusinessObjects Reporting Installation Guide

B035-3503

Teradata® Analytics for SAP® Solutions Data Replication Installation and Reference

B035-3505

Teradata® Analytics for SAP® Solutions Fundamentals Reference B035-3506

Teradata® Analytics for SAP® Solutions SAP® Data Services Reference

B035-3507

Teradata® Analytics for SAP® Solutions Informatica PowerCenter Reference

B035-3508

Teradata® Analytics for SAP® Solutions Customization Reference B035-3509

Teradata® Analytics for SAP® Solutions Module Reference B035-3510

Teradata® Analytics for SAP® Solutions Report Library Reference B035-3511

Page 6: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Preface

6 Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4

FOR TERADATA USE ONLY

Product Safety Information This document may contain information addressing product safety practices related to data or property damage, identified by the word Notice. A notice indicates a situation which, if not avoided, could result in damage to property, such as equipment or data, but not related to personal injury.

Example:

Notice: Improper use of the installation programs can result in data loss.

Page 7: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4 7

FOR TERADATA USE ONLY

Table of Contents

PREFACE 3

Preface ........................................................................................................ 3

Purpose ................................................................................................................................................... 3

Audience ................................................................................................................................................. 4

Revision History...................................................................................................................................... 4

Additional Information ............................................................................................................................ 5

Related Documents ..................................................................................................................... 5

Product Safety Information ...................................................................................................................... 6

Table of Contents .................................................................................................................................... 7

CHAPTER 1 9

Installation ................................................................................................. 9

Overview................................................................................................................................................. 9

Installation Result .................................................................................................................................. 10

Installation Steps ................................................................................................................................... 12

CHAPTER 2 17

Troubleshooting ........................................................................................ 17

Introduction ........................................................................................................................................... 17

Direct Errors Reported by the Installer ................................................................................................... 17

Output Files........................................................................................................................................... 18

CHAPTER 3 19

Post Installation Activities ........................................................................ 19

Post Installation Activities ..................................................................................................................... 19

CHAPTER 4 21

Usage ........................................................................................................ 21

Cluster Decoder Usage in a Standalone Situation ................................................................................... 21

Usage in Combination with the Replication Engine................................................................................ 23

Usage of Pool Decoder .......................................................................................................................... 23

APPENDIX A 25

Configuration Settings for Cluster Decoder ............................................... 25

Page 8: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Table of Contents

8 Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4

FOR TERADATA USE ONLY

APPENDIX B 29

Configuration Settings for Pool Decoder ................................................... 29

APPENDIX C 33

Example Configuration File for the Cluster Decoder .................................. 33

APPENDIX D 37

Example Configuration File for the Pool Decoder ...................................... 37

Page 9: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4 9

FOR TERADATA USE ONLY

CHAPTER 1

Installation

Overview Installation must be performed on a SUSE Linux system that has BTEQ available. It is recommended to setup a Teradata Express machine for this task. This is a virtual machine you can install on a desktop or laptop using VM-player. You may download the Teradata Express image from the Teradata Developer Exchange website. Use a 40 GB version with the same version as your actual database to limit the space requirements. Alternatively you can use a SUSE Linux 10 or 11 system with a working BTEQ client installed.

The decoder package contains two installers that use configuration files to perform the actual installation into the database. The main role of the installer is to execute sets of BTEQ commands.

The Decoders must be installed on the same database the SAP tables will be replicated to. The database should contain the replicated DD02L, DD03L and DD16S tables as a minimum requirement.

During the installation the installers use information stored in the configuration and the replicated SAP tables DD02L, DD03L and DD16S to generate the required decoder functions.

Note: The generated decoder functions are not portable. Every database that requires the functions needs a separate installation because the decoder process is dependent on the specifics of the SAP system at hand.

You must enter several parameters about file path, SAP database type and required Cluster c.q. Pool Tables in the configuration files. See the Appendices for more information.

After modifying the configuration file the installer is executed and the temporary and final functions will start to appear and disappear in the target database. At the end of the process only the required functions for decoding remain.

IMPORTANT: When installing the decoders, be aware that any preceding installation will be erased, overwritten, or recreated depending on the settings of the previous run and the current installation. Therefore it is recommended that all required decoders (for each required target table) be installed at the same time.

Page 10: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Chapter 1: Installation Installation Result

10 Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4

FOR TERADATA USE ONLY

Alternatively you can re-run the installation with the new tables added to the original set, in the configuration file. First make a copy of the contents of the existing decoded tables (in the case of Custer tables) as the installation will re-create the decoders for the existing tables as well.

Installation Result When the installation is successful you will have several new objects in your database. The example below shows the objects available after a successful installation. Depending on the choices you made during installation, your objects may look different.

• Functions

• Tables

Page 11: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Chapter 1: Installation Installation Result

Teradata® Analytics for SAP® Solutions Decoder Installation Guide Release 2.4 11

FOR TERADATA USE ONLY

• Views

1. Functions

The generated functions are the core of the decoders. Every target table will have its own function. It will look similar to the screen shown above.

For the Pool decoder, only one function will show.

2. Tables

All required target tables are created in the database, by default ending with _CLSTR (see Appendix A: Configuration Settings). For example, SAP table KONV (pricing conditions) will show up as KONV_CLSTR (when using the default suffix, see Appendix A). The tables are empty at this point.

Two additional tables are created, DD_CLUSTER and DD_POOL. These tables have a number of entries containing the code to create and populate the Target tables. Basically these are CREATE/SELECT/INSERT, VIEWS and STORED PROCEDURE statements for each of the target tables. Examples are shown below.

DD_CLUSTER:

Page 12: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Chapter 1: Installation Installation Steps

12 Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4

FOR TERADATA USE ONLY

DD_POOL

The actual command is stored as plain text in the (BLOB-) field FL_BLOBxx and can be copied into a SQL editor.

Installation Steps 1. Obtain the package “InstallableDecluster_v172.zip” (version 1.7.2) and

InstallablePoolDecoder_v13.zip (version 1.3).

Each archive holds three files.

File Description

Cluster Decoder

install The (Linux) installation program

TD_Decluster_Config.txt The parameters for installing the declustering functions, as described in the previous section.

TD_INSTALL.zip A zipped file that holds necessary source files for creation of the declustering functions based on the table structure of the SAP system at hand, as well as the actual decoding routines.

Pool Decoder

install The (Linux) installation program

TD_INSTALL.zip A zipped file that holds necessary source files for creation of the depooling functions based on the table structure of the SAP system at hand, as

Page 13: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Chapter 1: Installation Installation Steps

Teradata® Analytics for SAP® Solutions Decoder Installation Guide Release 2.4 13

FOR TERADATA USE ONLY

File Description

well as the actual decoding routines.

TD_PoolDecoder_Config.txt The parameters for installing the depooling functions, as described in previous section.

2. Verify the following prerequisites:

• If you use "Teradata SQL Assistant" make sure you are using “Teradata.net” connection mode and not “ODBC”. Otherwise it will fail to show all functions created.

• Existence of and access to the replication database. • Use BTEQ from the system you are using to install the functions to

make sure you can log on to the database. • The replication software must be installed and at the very least the

initial sync for table DD02L, DD03L and DD16S must be executed. Ideally the Cluster-source and Pool source tables should be replicated as well (i.e. RFBLG, KOCLU, ATAB, etc).

• The database the user used to log on to database needs rights on the database for: WRITING and REPLACING functions DROPPING functions DROPPING tables CREATING tables SELECT Access to DD02L,DD03L and DD16S

• The OS user for the system used to perform the installation needs rights on the file system on which installation is executed: Rights to create a directory below the directories configured in

the installation configuration. Rights to a directory to write logging.

• The Pool decoder has a limitation with the number of tables it can decode per database. If the number of Pool tables you want to access exceeds 100 you are required to use an additional database for installation of the surplus of tables.

3. Create a directory on the Linux machine “˜/ClusterDecoder“ 4. Create a directory on the Linux machine “˜/ClusterDecoder/log 5. Create a directory on the Linux machine “˜/ClusterDecoder/tempPath 6. Create a directory on the Linux machine “˜/PoolDecoder“

Page 14: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Chapter 1: Installation Installation Steps

14 Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4

FOR TERADATA USE ONLY

7. Create a directory on the Linux machine “˜/PoolDecoder/log“ 8. Create a directory on the Linux machine “˜/PoolDecoder/tempPath“

9. Copy the file “InstallableDecluster_v172.zip” into ̃ /ClusterDecoder/ 10. Copy the file “InstallablePoolDecoder_v13” into “˜/PoolDecoder/“

11. Issue the command "unzip InstallableDecluster_v172.zip from the directory

../ClusterDecoder 12. Issue the command "unzip InstallablePoolDecoder_v13.zip from the directory

../PoolDecoder

13. Use an available editor (GEDIT or “vi") to modify the configuration file “TD_Decluster_Config.txt” See appendix 1 for details.

14. Use an available editor (GEDIT or “vi") to modify the configuration file “TD_PoolDecoder_Config.txt” See appendix 2 for details. Please double check all your entries.

15. Start the installation:

First go to the appropriate directory (../ClusterDecoder or ../PoolDecoder). The syntax to start the installation is:

./install <path and file to installation configuration file>

For example, for the Cluster Decoder:

“./install ./TD_Decluster_Config.txt”

and for the Pool Decoder:

“./install ./TD_PoolDecoder_Config.txt”

The installer will first show the configuration parameter settings it obtains from the configuration file.

Then, if no issues are encountered, you will see a screen similar to the one below for the Cluster Decoder

An example of the screen shown for the Pool Decoder is shown below.

Page 15: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Chapter 1: Installation Installation Steps

Teradata® Analytics for SAP® Solutions Decoder Installation Guide Release 2.4 15

FOR TERADATA USE ONLY

Page 16: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Chapter 1: Installation Installation Steps

16 Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4

FOR TERADATA USE ONLY

Page 17: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4 17

FOR TERADATA USE ONLY

CHAPTER 2

Troubleshooting

Introduction

Direct Errors Reported by the Installer

Error Message Check

Page 18: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

CHAPTER 2: Trouble Shooting Output Files

18 Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4

FOR TERADATA USE ONLY

Error Message Check

No configuration name for Replicator configuration provided (label: RP_ConfigName). Use a maximum of 25 characters.

Was configuration name provided for the replication configuration

Error(s) found during installation, look in <fileNm> for details.

Are there errors found during generation of the decluster functions?

Output Files Some files are created after installation. In some cases the installation produces a complex error, noted by the remark

"Errors found during installation, look in <fileNm> for details.”

The table below provides more information about these files. Note that “dt_installation” in the file name stands for the timestamp of the installation

File Name Description

<dt_installation>_error.txt Holds error messages during the installation script.

<dt_installation>_output.txt Holds the output of all script commands. If any errors were found during the installation, a message is displayed at the end of the installation. This file is the starting point to look for the cause of the error.

<dt_installation>_TD_INSTALLED.zip Special log file that can help Teradata Support gain additional insight into any installation problems. When calling Teradata Support, make sure this and the two files above are available.

The existence of the file whose name includes….._error.txt does not automatically mean the installation failed as some operations initiated by the installer typically will fail on a new installation (i.e., the cleanup of old existing objects from previous installations).

Page 19: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4 19

FOR TERADATA USE ONLY

CHAPTER 3

Post Installation Activities

Post Installation Activities Perform the following post installation steps.

1. Verify the existence of the decoder functions using Teradata SQL assistant or another suitable tool. Use the screen captures on page 10 to 11 as guidance.

2. Check whether the Tables DD_CLUSTER and DD_POOL hold the expected records. Use the screen captures s on page 11 as guidance.

Page 20: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Chapter 3: Post Installation Activities Post Installation Activities

20 Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4

FOR TERADATA USE ONLY

Page 21: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4 21

FOR TERADATA USE ONLY

CHAPTER 4

Usage

Cluster Decoder Usage in a Standalone Situation

After installation the functions can be used for decoding "clustered" data from the cluster tables.

For each table that needs decoding a set of SQL statements is generated and stored in table DD_CLUSTER. You will also need some of these statements when installing the full Teradata solution; see the document Teradata® Analytics for SAP® Solutions Data Replication Installation and Reference, B035-3505) for more information.

To illustrate the usage, a small explanation of the format of the SELECT statement is shown below. The other commands (INSERT and MERGE) work similarly.

Each SELECT statement from DD_CLUSTER uses the structure below.

-- This SQL selects fields from the clustered table KOCLU for unclustered table KONV

-- Generated on 20140319 15:30

WITH wq (docId_w,“pageNo_w, vardata_w ) AS

(

SELECT

(T1.Fld1 || '~#~' || T1.Fld2 ) AS docId,

PAGENO,

CAST(VARDATA as VARBYTE(4095))

FROM <DB_NAME>.<CLUSTERED_TABLE_NAME> T1

WHERE T1.TAS_RP_OPCODE <> 'D'

AND T1.VARDATA is not null

-- <Insert an own filter to limit the number of documents to be processed>

)

SELECT O_TABLE.*

FROM TABLE(

SAP_CLUSTER.TAS_CollectAndSplit<DECLUSTERED_TABLE_NAME>( wq.docId_w, wq.pageNo_w, wq.vardata_w)

RETURNS (

Fld1 VARCHAR(3), Fld2 VARCHAR(10),

Page 22: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Chapter 4: Usage Cluster Decoder Usage in a Standalone Situation

22 Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4

FOR TERADATA USE ONLY

<other fields>

)

HASH BY docId_w LOCAL ORDER BY docId_w, pageNo_w

) O_TABLE

The SELECT statement can be split into two parts:

WITH ….

SELECT .. FROM TABLE( function call() RETURNS(fields) HASH BY .. LOCAL ORDER BY …) ….

The WITH statement holds the selection of the data from the clustered table. This is the input to the declustering function.

Limit the input to the declustering function by using a WHERE clause in the WITH part of the statement.

A document Id is generated (docId) by concatenating the primary key fields (excluding the field PAGENO) from the clustered table separated by ~#~.

Note: Within the declustering this “~#~“ expression is also used. This should not be changed.

The variables as defined in the WITH clause are used in the call of the function. The output of the function starts with the fields that formed the document Id in the WITH clause.

Those fields (the first part of the primary key of the output table) are not part of the clustered data and therefore are derived from the document Id.

At the end of the SELECT statement the following statement is included:

HASH BY docId_w LOCAL ORDER BY docId_w, pageNo_w

The HASH BY part takes care of combining all records with the same docId on one database AMP.

The LOCAL ORDER BY part ensures the clustered data is in the right order into the function.

This line is required to run the decoder function; the function will fail when missing.

Page 23: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Chapter 4: Usage Usage in Combination with the Replication Engine

Teradata® Analytics for SAP® Solutions Decoder Installation Guide Release 2.4 23

FOR TERADATA USE ONLY

Usage in Combination with the Replication Engine

The Cluster Decoder is part of the Teradata Analytics for SAP Solutions package so it works as part of a whole system. In the Teradata solution, the actual calling of the decoders is done automatically from the replication engine. Refer to the Install the Cluster and Pooled Table Decoders section in the document Teradata® Analytics for SAP® Solutions Data Replication Installation and Reference, B035-3505. This describes in detail the steps required to integrate the decoder execution into the Teradata solution.

Usage of Pool Decoder The Pool Decoder does not need to be invoked manually. The generated views (see page 15) can be used to access the required data. For example, table T008 is a pool table in SAP. The data is stored at the database level in table ATAB. In Teradata a view has been created with the same name as the pool table in SAP. Selecting data from this view will invoke the decoder to process data from ATAB and return it as if T008 was a normal (transparent) table.

Page 24: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Chapter 4: Usage Usage of Pool Decoder

24 Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4

FOR TERADATA USE ONLY

Page 25: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4 25

FOR TERADATA USE ONLY

APPENDIX A

Configuration Settings for Cluster Decoder

The installation parameters must be put in a plain text configuration file. An example of the configuration file is available below. The default name is TD_Decluster_Config.txt.

The file takes a number of parameters discussed below. If a line is empty or starts with #, the line is ignored. The labels are not case sensitive. The reason for labels in the file (and also in the next table) is to enhance readability. Path names are case sensitive.

The parameters and their descriptions are shown below, in alphabetical order.

Label Description

create_DD_cluster If true, the DD_CLUSTER table is created.

If false, the table is not created.

The valid values are: true or false. Default: true.

If DD_CLUSTER already exists, the previous data inside this table is deleted.

dbCharSet This field is used to set the 'language' of the database.

Only UNICODE is currently supported

dbName The dbName in which the data dictionary tables are available and in which the functions are created (and also the output tables created, if requested).

decluster[x].Table This parameter describes the table for which a decluster function is to be generated. Ensure that each output table gets a unique sequence number)..

decluster[x].primIndexFields This parameter describes the primary Index fields to be used on creating the target table as stated under decluster[x].Table.

Make sure you use the same sequence number as for the table itself and the label sits directly below the table label in the file.

Page 26: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Appendix A: Configuration Settings for Cluster Decoder Usage of Pool Decoder

26 Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4

FOR TERADATA USE ONLY

Label Description

DecodedTableSuffix The output tables can be generated with a suffix to indicate them as cluster tables. The default setting is cluster[x].

dropCombinedDD If true, the Combined data dictionary table is dropped after (and before) generating the decluster functions.

If false, the Combined data dictionary is not dropped. Useful for debug purposes. The name of the combined DD is DB_NAME.T_GEN_TAS

The valid values are: true or false. Default: true (drops the table).

installationTrace Technical switch; only change if requested by Teradata Technical Support. Default value: false.

IP_adres The address of the Teradata server: either the DNS name port, such as MyDatabase.MyDepartment.MyCompany.com or the IP address of the server (i.e.,192.168.001.002)

PathToLog The directory in which the logging output is saved.

passWd The password that belongs to the database userId, as named in the parameter UserId.

PerformCreateTable If true, tables that can hold the output with the format as described in the data dictionary are created.

If the tables already exist, the output tables are not altered.

If false, the tables are not created.

The valid values are: true or false. Default: true.

PerformCreateMergeViews To use the Merge statement (as stored in DD_CLUSTER) for decoding a view is required in the MERGE command. This parameter controls the creation of these views. Default value: true

Page 27: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Appendix A: Configuration Settings for Cluster Decoder Usage of Pool Decoder

Teradata® Analytics for SAP® Solutions Decoder Installation Guide Release 2.4 27

FOR TERADATA USE ONLY

Label Description

ReplicatedTableSuffix The tables that hold the clustered data are not necessarily the same as the tables named in the data dictionary. They can have an extension, because they are replicated from the SAP-database.

This extension is used in creating the SOL-statements that are available as SQL-snippets in the DD_CLUSTER table as well as in the stored procedures.

For example, the source table for BSEG is RFBLG. You may want to add a suffix to replicated tables like “_R” in the replication system. In that case the line should read:

ReplicatedTableSuffix=_R

Default: no suffix.

RP_ConfigName The name of the configuration used in the Teradata Replication software. This is used to generate the correct stored procedures so declustering is done automatically for all new and updated records. Do not use more than 25 characters in the name of the configuration.

showDBPassWd If true, the password is shown in the installation script on the screen, which is useful for debug purposes.

If false, the DBPassword is only used in the scripts, and not shown on screen.

The valid values are: true or false. Default: false.

sourceDatabase SAP can run on different underlying databases. At present Teradata Analytics for SAP Solutions supports Oracle and DB/2. This parameter tells the installer for which source database the installation is required. Possible values are DB2 and Oracle. Default: Oracle.

tableNameDD02L Table DD02L is a data dictionary table from SAP (SAP-table names and characteristics). It is required for the installation of the decoder. If you renamed the table, update the name of this parameter.

tableNameDD03L Table DD03L is a data dictionary table from SAP (SAP-table field names and characteristics). It is required for the installation of the decoder. In case you renamed the table, update the name of this parameter.

tableNameDD16S Table DD16S is a data dictionary table from SAP containing database table fields and characteristics. It is required for the installation of the decoder. If you renamed the table, update the name in this parameter.

Page 28: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Appendix A: Configuration Settings for Cluster Decoder Usage of Pool Decoder

28 Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4

FOR TERADATA USE ONLY

Label Description

TemporaryPath This is a temporary path to which the OS-user as well as the Database has read-write and execute rights.

You must create this path yourself. The Installer program will generate an error if the path is not available or accessible.

UserId The userId to log on via BTEQ to the database.

Page 29: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Appendix B: Configuration Settings for Pool Decoder Usage of Pool Decoder

Teradata® Analytics for SAP® Solutions Decoder Installation Guide Release 2.4 29

FOR TERADATA USE ONLY

APPENDIX B

Configuration Settings for Pool Decoder

The installation parameters must be put in a plain text configuration file. An example of the configuration file is available below. The default name is TD_Decluster_Config.txt.

The file takes the parameters listed below. If a line is empty or starts with #, the line is ignored. The labels are not case sensitive. The reason for labels in the file (and also in the next table) is to enhance readability. Path names are case sensitive.

Below are the parameters and their descriptions in alphabetical order.

Label Description

create_DD_POOL If true, the DD_POOL table is created.

If false, the table is not created.

The valid values are: true or false. Default: true.

If DD_POOL already exists, the previous data inside this table is deleted.

dbCharSet This field is used to set the 'language' of the database.

Only UNICODE is currently supported

dbName The dbName in which the data dictionary tables are available and in which the functions (and the views) are created.

dropCombinedDD If true, the Combined data dictionary table is dropped after (and before) generating the de-pool functions.

If false, the Combined data dictionary is not dropped. Useful for debug purposes. The name of the combined DD is DB_NAME.T_GEN_TAS

The valid values are: true or false. Default: true (drop the table).

Page 30: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Appendix B: Configuration Settings for Pool Decoder Usage of Pool Decoder

30 Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4

FOR TERADATA USE ONLY

Label Description

installationTrace Technical switch, only change on request of Teradata Technical Support. Default value: false.

IP_adres The address of the Teradata server: either the DNS name port, such as MyDatabase.MyDepartment.MyCompany.com or the IP address of the server i.e.,192.168.001.002.)

PathToLog The directory in which the logging output is saved.

passWd The password that belongs to the database userId. as named in the parameter UserId.

Pool[x].Tablename This parameter describes the table for which a de-pooling logic is to be generated. Ensure that each output table gets a unique sequence number).

showDBPassWd If true, the password is shown in the installation script on the screen, which is useful for debug purposes).

If false, the DBPassword is only used in the scripts and not shown on screen.

The valid values are: true or false. Default: false.

sourceDatabase SAP can run on different underlying databases. At present Teradata Analytics for SAP Solutions supports Oracle and DB/2. This parameter tells the installer for which (source) database the installation is required. Possible values are DB2 and Oracle. Default: Oracle.

tableNameDD02L Table DD02L is a data dictionary table from SAP (SAP-table names and characteristics). It is required for the installation of the decoder. If you renamed the table, update the name of this parameter.

tableNameDD03L Table DD03L is a data dictionary table from SAP (SAP-table field names and characteristics). It is required for the installation of the decoder. If you renamed the table, update the name of this parameter.

tableNameDD16S Table DD16S is a data dictionary table from SAP (database table fields and characteristics). It is required for the installation of the decoder. If you renamed the table, update the name in this parameter.

Page 31: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Appendix B: Configuration Settings for Pool Decoder Usage of Pool Decoder

Teradata® Analytics for SAP® Solutions Decoder Installation Guide Release 2.4 31

FOR TERADATA USE ONLY

Label Description

TemporaryPath This is a temporary path to which the OS-user as well as the Database has read-write and execute rights.

You must create this path yourself. The Installer program will generate an error if the path is not available or accessible.

UserId The userId to log on via BTEQ to the database.

Page 32: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Appendix B: Configuration Settings for Pool Decoder Usage of Pool Decoder

32 Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4

FOR TERADATA USE ONLY

Page 33: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4 33

FOR TERADATA USE ONLY

APPENDIX C

Example Configuration File for the Cluster Decoder

# ====================================================================================

#

# T E R A D A T A P O O L / C L U S T E R T A B L E D E C O D E R

#

# Version 1.6

# <Date of version>

#

# This configuration file must be used to install the decluster functions

# Verify its contents before installation of the functions

#

# Usage: "./install ./TD_Decluster_Config.txt"

#

# ====================================================================================

# ====================================================================================

# This is a temporary path to which the operator-user as well as the BTEQ-user

# has read-write and execute rights.

# The TemporaryPath should point to an empty directory.

# After a successful execution of the procedure the directory will be

# cleaned out automatically

# ------------------------------------------------------------------------------------

TemporaryPath=/home/MyUser/ClusterDecoder/tempPath/

# ====================================================================================

# Path for the logging data

# ------------------------------------------------------------------------------------

PathToLog=/home/MyUser/ClusterDecoder/log/

# ====================================================================================

# Teradata Database Connection settings

# ------------------------------------------------------------------------------------

IP_adres=<DNS name or IP address of Teradata Server>

dbName=<Name of database>

userId=<DB User ID>

showDBPassWd=false

passWd=<DB user’s password>

RP_ConfigName=<Replicate Configuration Name>

# ====================================================================================

# The list below determines for which output tables a decoding function is to be

# generated. Per output table may specify the Primary Index fields as well.

Page 34: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Appendix C: Example Configuration File for the Cluster Decoder Usage of Pool Decoder

34 Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4

FOR TERADATA USE ONLY

# New cluster tables with relevant output tables can be added to this section.

# Make sure the table-numbering is consistent.

# ------------------------------------------------------------------------------------

# RFBLG source

decluster[1].Table=BSEG

decluster[1].primIndexFields=BUKRS, BELNR, GJAHR

#decluster[x].Table=BSET

#decluster[x].Table=BSEC

#decluster[x].Table=BSED

#decluster[x].Table=BSES

#decluster[x].Table=BSSEG

# KOCLU source

decluster[2].Table=KONV

decluster[2].primIndexFields=KNUMV

# AABLG source

decluster[3].Table=AUAS

decluster[3].primIndexFields=MANDT, BELNR

#decluster[x].Table=AUAB

#decluster[x].Table=AUAA

#decluster[x].Table=AUAO

#decluster[x].Table=AUAS

#decluster[x].Table=AUAT

#decluster[x].Table=AUAV

#decluster[x].Table=AUAW

#decluster[x].Table=AUAY

# CDCLS source

#decluster[x].Table=CDPOS

#ddecluster[x].Table=PCDPOS

# RFHMn source

#decluster[x].Table=MHND

# ====================================================================================

# The next parameters are only to be changed if requested by Teradata Support

# ------------------------------------------------------------------------------------

dropCombinedDD=true

PerformCreateTable=true

PerformCreateMergeViews=true

# ====================================================================================

# The next labels define the data dictionary tables required

# DD02L defines the relation of cluster tables and ABAP-Tables

# DD03L defines the fields in (all) ABAP tables.

# If replicated under a different name you can enter the new name below

# ------------------------------------------------------------------------------------

tableNameDD02L=DD02L

tableNameDD03L=DD03L

tableNameDD16S=DD16S

Page 35: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Appendix C: Example Configuration File for the Cluster Decoder Usage of Pool Decoder

Teradata® Analytics for SAP® Solutions Decoder Installation Guide Release 2.4 35

FOR TERADATA USE ONLY

# ====================================================================================

# The next parameters give extensions to tables used by the decoders

# - ReplicatedTableSuffix is a suffix to the replicated cluster tables

# - decodedTableSuffix is a suffix to the default SAP name of the declustered tables

# ------------------------------------------------------------------------------------

ReplicatedTableSuffix=

decodedTableSuffix=_CLSTR

# ====================================================================================

# This setting tells the installer to create an table with useful SQL statements

# for calling the decoding functions. Default value is true

# ------------------------------------------------------------------------------------

create_DD_cluster=true

# ====================================================================================

# Miscellaneous settings below; only to be changed if requested by Teradata Support

# ------------------------------------------------------------------------------------

# ------------------------------------------------------------------------------------

# Codepage setting for source database (not implemented yet)

# Possible value is only UNICODE

# ------------------------------------------------------------------------------------

dbCharSet=UNICODE

# ------------------------------------------------------------------------------------

# The source database (before replication) i.e. the database that SAP runs on

# possible values are DB2 and Oracle

# ------------------------------------------------------------------------------------

sourceDatabase=Oracle

# ------------------------------------------------------------------------------------

# Normally not used, only for debug purposes

# ------------------------------------------------------------------------------------

#installationTrace=false

# ---------------------------------------------------------------------------------

# Very special purposes, to be used by Teradata staff only.

# ---------------------------------------------------------------------------------

#keepTemporaryAlive

Page 36: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Appendix C: Example Configuration File for the Cluster Decoder Usage of Pool Decoder

36 Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4

FOR TERADATA USE ONLY

Page 37: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Appendix D: Example Configuration File for the Pool Decoder Usage of Pool Decoder

Teradata® Analytics for SAP® Solutions Decoder Installation Guide Release 2.4 37

FOR TERADATA USE ONLY

APPENDIX D

Example Configuration File for the Pool Decoder

# ====================================================================================

#

# T E R A D A T A P O O L T A B L E D E C O D E R

#

# VERSION 1.2

# <Date of version>

#

# This configuration file must be used to install the Pool Decoder functions

# Verify its contents before installation of the functions

# Values between < and > MUST be updated/adapted to local settings

#

# Usage: "./install ./TD_PoolDecoder_Config.txt"

#

# ====================================================================================

# ====================================================================================

# This is a temporary path to which the operator-user as well as the BTEQ-user

# has read-write and execute rights.

# The TemporaryPath should point to an empty directory.

# After a successful execution of the procedure the directory will be

# cleaned out automatically

# ====================================================================================

TemporaryPath=</home/MyUser/PoolDecoder/tempPath/>

# ====================================================================================

# Path for the logging data

# ====================================================================================

PathToLog=</home/MyUser/PoolDecoder/log/>

# ====================================================================================

# Teradata Database Connection settings

# Make sure the user credentials specified have Select privileges on DBC objects

# ====================================================================================

IP_adres=<DNS name or IP address of Teradata Server>

dbName=<Name of database>

userId=<DB User ID>

showDBPassWd=false

passWd=<DB user password>

Page 38: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Appendix D: Example Configuration File for the Pool Decoder Usage of Pool Decoder

38 Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4

FOR TERADATA USE ONLY

# ====================================================================================

# The list below determines for which output tables a decoding function is to be

# generated.

# Make sure the table-numbering is consistent.

# At present due to a system limitation you can only specify a maximum of 20 tables per database

# Consider using an additional database to facilitate decoding of more then 20 tables

# Make sure you copy the DDxxx tables as well to the new database

# ====================================================================================

# Pool Tables to Decode

pool[1].Table=T001S

#pool[x].Table=T003T

#pool[x].Table=T004T

#pool[x].Table=T008

#pool[x].Table=T008T

#pool[x].Table=T009

#pool[x].Table=T009B

#pool[x].Table=T009T

#pool[x].Table=T030

#pool[x].Table=T077S

#pool[x].Table=T077Z

#pool[x].Table=T517A

#pool[x].Table=TBSL

#pool[x].Table=TBSLT

#pool[x].Table=TCA01

#pool[x].Table=TCA02

# ====================================================================================

# The next parameters are only to be changed if requested by Teradata Support

# ====================================================================================

dropCombinedDD=true

PerformCreateTable=true

# ====================================================================================

# The next labels define the data dictionary tables required

# DD02L defines the relation of pool tables and ABAP-Tables

# DD03L defines the fields in (all) ABAP tables.

# If replicated under a different name you can enter the new name below

# ====================================================================================

tableNameDD02L=DD02L

tableNameDD03L=DD03L

tableNameDD16S=DD16S

# ====================================================================================

# This setting tells the installer to create an table with useful SQL statements

# for calling the decoding functions. Default value is true

# ====================================================================================

create_DD_pool=true

Page 39: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

Appendix D: Example Configuration File for the Pool Decoder Usage of Pool Decoder

Teradata® Analytics for SAP® Solutions Decoder Installation Guide Release 2.4 39

FOR TERADATA USE ONLY

# ====================================================================================

# Miscellaneous settings below; only to be changed if requested by Teradata Support

# ====================================================================================

# ====================================================================================

# Codepage setting for source database (not implemented yet)

# Possible value is only UNICODE

# ====================================================================================

dbCharSet=UNICODE

# ====================================================================================

# The source database (before replication) i.e. the database that SAP runs on

# possible values are DB2 and Oracle

# ====================================================================================

sourceDatabase=Oracle

# ====================================================================================

# Normally not used, only for debug purposes

# ====================================================================================

#installationTrace=false

# ====================================================================================

# Very special purposes, to be used by Teradata staff only.

# ====================================================================================

#keepTemporaryAlive=false

Page 40: Decoder Installation Guide - knowledge.teradata.comknowledge.teradata.com/support/general/kcs.nsf/xsp/.ibmmodres... · sets of BTEQ commands. ... • The replication software must

: Example Configuration File for the Pool Decoder Usage of Pool Decoder

40 Teradata® Analytics for SAP® Solutions Decoder Installation Guide, Release 2.4

FOR TERADATA USE ONLY