odbc fine tuning - sap · pdf filecustomer sap businessobjects predictive analytics 3.1...

50
CUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

Upload: vodien

Post on 17-Feb-2018

225 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

CUSTOMER

SAP BusinessObjects Predictive Analytics 3.12017-10-26

ODBC Fine TuningAutomated Analytics Configuration Guide

Page 2: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

Content

1 What's New in ODBC Fine Tuning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.1 Document History. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 About this Document. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3 Issues with ODBC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

4 How Automated Analytics Manages ODBC Specificities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

5 How to Override Automated Analytics Automatic Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . 105.1 Overriding the Full Behavior. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115.2 Other Options to Override. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11

AcceptTable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14ApplyWorkArounds. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14CanAskTableDescription. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15CanGenerateConnectorSQLWithSubSelectLimit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15CaseSensitive. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16checkConflictInAppendMode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Commit Frequency. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17CreateNonLoggedTable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17DynamicAuthorizedChars. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17DynamicSQLKeyWords. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17GuessMode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18HANADataStorageAsColumns, HANATempStorageAsColumns. . . . . . . . . . . . . . . . . . . . . . . . . 18HANAViewsWithOrder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19HasFastOrderInSelect. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19IgnorePrefixOnNumeric. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19InitDataManipulationPackage, SQLOnInitDataManip. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19KxenBool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20KxenDate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20KxenDateTime. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20KxenInteger64. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20KxenNumber. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21KxenString. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21KxenUString. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21KxLocksName. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21LocksPolicy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22ManageForeignKeys. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22

2 C U S T O M E RODBC Fine Tuning

Content

Page 3: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

MaxConcurrentStatements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23MaximumLengthOfDBMSString. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23MaximumLengthOfDBMSUString. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23MaxSizeForBlob. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23MetaDataUseFastStarSelect. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24NetezzaUseLimitAll. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24OracleMaxNumberDigitsForInteger. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24OracleParallelCreationMode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25PrimaryKeyRegExp, NotPrimaryKeyRegExp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26RejectTable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26SmartCreateTableAndKeys. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28SmartSelectForCountOnTable, SmartSelectForCountOnSelect, SmartSelectForCountOnConnector, SmartSelectForFullRead, SmartSelectForGuess, SmartSelectForLayout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28SQLOnCatalog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29SQLOnConnect. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31SQLOnDisconnect. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32SupportHugeOracleIntegers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32SupportKxDesc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32SupportNativeInfos. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33SupportNativeRead. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33SupportPrimaryKeys and SupportStatistics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33SupportTempTables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34SupportUnicodeOnConnect. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34TableTypesFilter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34Unicode Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35UserAuthorizedChars. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36UserKeywords. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36WarnAboutIssues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

5.3 Schema Definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37defaultSchemaForKxenTemporary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37defaultSchemaForMetadata. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

5.4 Data Manipulation SQL Generation Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38AggregatesAsCorrelated. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38AggregatesAsCorrelated_Exists. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39AggregatesAsCorrelated_FirstLast. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40AllowFiltersInIntermediatesSteps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40AutomaticallyExportedFields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41ConstantFieldsManagedByValue. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41CorrelatedTablesGroupSize. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41DisableDuplicateIdManagementForAggregates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

ODBC Fine TuningContent C U S T O M E R 3

Page 4: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

EnforceCommonTableExpressionUsage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42ForwardVisbleKeysToIntermediateSteps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43GenerateAggregatesFilterInTheOperand. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43GenerateSerialMerge. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44MaxExtraCondUsage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44OptimizeExpressionsBasedOnDM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44OptimizeMultiInstancesExpressions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45OptimizeMultiInstancesThreshold. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45PrefilterAggregatesGroupTable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46SQLAsSQLScript. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46TSPPersistence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46UnusedKeysInIntermediatesForOptim. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

4 C U S T O M E RODBC Fine Tuning

Content

Page 5: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

1 What's New in ODBC Fine Tuning

Links to information about the new features and documentation changes for ODBC Fine Tuning.

SAP BusinessObjects Predictive Analytics 3.1

What's New Link to More Information

New HANAViewsWithOrder option to sort the content of SAP HANA views

● Other Options to Override [page 11]● HANAViewsWithOrder [page 19]

Added note about SAP HANA connections in the schema definition options

● defaultSchemaForKxenTemporary [page 37]● defaultSchemaForMetadata [page 37]

1.1 Document History

Software Version Link to More Information

SAP BusinessObjects Predictive Analytics 3.0 A new LocksPolicy strategy

See LocksPolicy [page 22]

A new option CaseSensitive that adds quotes around the table and column names

See CaseSensitive [page 16]

Update of standard macros for defaultSchemaForMetadata and DefaultTempSchemaName

See

● Format of the SQL Request to Use for SQLOnCatalog [page 29]

● defaultSchemaForMetadata [page 37]● defaultSchemaForKxenTemporary [page 37]

A new SQL generation option EnforceCommonTableExpressionUsage

EnforceCommonTableExpressionUsage [page 42]

ODBC Fine TuningWhat's New in ODBC Fine Tuning C U S T O M E R 5

Page 6: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

Software Version Link to More Information

SAP BusinessObjects Predictive Analytics 2.4 A new option for Netezza database, NetezzaUseLimitAll, lets you activate or deactivate usage of the SQL tuning option LIMIT ALL for Netezza’s SQL optimizer.

See NetezzaUseLimitAll [page 24]

6 C U S T O M E RODBC Fine Tuning

What's New in ODBC Fine Tuning

Page 7: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

2 About this Document

This document describes how to configure minimal functionalities in an Open Database Connectivity (ODBC) configuration for Automated Analytics. Issues encountered when using the ODBC standard with the application are described as well as solutions to help bypass these issues.

ODBC Fine TuningAbout this Document C U S T O M E R 7

Page 8: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

3 Issues with ODBC

The ODBC framework consists of two elements:

● The ODBC driver manager. The manager does the following:○ Manages the list of drivers and known databases.○ Transmits all requests to the DBMS ODBC driver.○ Manages Unicode when the DBMS does not provide this service.

● The ODBC drivers. The drivers implement the ODBC API so that the ODBC driver manager can use it.

The ODBC standard being somewhat vague, tests have revealed problems with the ODBC manager and the ODBC drivers. Such as:

For the ODBC driver manager (depending on the platform):

● Some advanced requests cannot be implemented.● Unicode compatibility depends highly on the DBMS/client setup and in some cases is unavailable.

For ODBC drivers:

● Some information about the DBMS features can be missing, inaccurate, partial, or difficult to use.● On some ODBC drivers, even simple operations like asking for standard information can cause a crash.

8 C U S T O M E RODBC Fine Tuning

Issues with ODBC

Page 9: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

4 How Automated Analytics Manages ODBC Specificities

Automated Analyticsprovides access to ODBC middleware as follows:

If the application recognizes a supported DBMS Automated Analytics uses internal drivers.

These mini drivers hard-code a correct behavior for the cur­rent DBMS and bypass known ODBC issues for this DBMS. For example:

● Since Access publishes an incorrect list of valid charac­ters for SQL requests, the application forces the use of SQL ANSI standard.

● Since MySQL with a UNIX client can crash if asked for the list of reserved key words, the application forces the use of a hard-coded SQL ANSL list of key words.

● Since Teradata does not publish the key words to de­clare Unicode data, the application uses a hard-coded Teradata syntax.

Automated Analytics sets options depending on the recog­nized DBMS.

If the application does not recognize a supported DBMS Automated Analytics uses a generic driver that asks the minimum from ODBC.

You can override most of these automatic settings. Refer to the related information below.

NoteFor the list of supported platforms, refer to the Product Availability Matrix page and search for “SAP BusinessObjects Predictive Analytics”.

CautionNames of tables and columns are not quoted by default. So if they contain mixed cases or special characters including spaces, they can be misinterpreted by the DBMS. To change this behavior, you need to set the option CaseSensitive to "True". For more details, refer to the related information below.

Related Information

How to Override Automated Analytics Automatic Settings [page 10]CaseSensitive [page 16]

ODBC Fine TuningHow Automated Analytics Manages ODBC Specificities C U S T O M E R 9

Page 10: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

5 How to Override Automated Analytics Automatic Settings

The standard configuration files provide options to override ODBC traits.

● KxCORBA.cfg when using an SAP BusinessObjects Predictive Analytics server.● KJWizard.cfg when using an SAP BusinessObjects Predictive Analytics workstation.

Each declared ODBC data source can have its own set of overrides.

The syntax for an override is as follows:

ODBCStoreSQLMapper.<ODBC DSN>.<Option>="<Value>"

The following table describes the parameters:

Parameter Case sensitive Space and tab characters allowed

<ODBC DSN> yes no

<Option> no no

<Value> no yes

For example, if you have an ODBC data source named MyDBMS, the following syntax indicates that the application cannot request the list of specific SQL keywords when using MyDBMS:

ODBCStoreSQLMapper.MyDBMS.DynamicSqlKeywords="no"

To override all your ODBC data sources, replace the parameter <ODBC DSN> by * in the syntax.

For example, instead of using the override option DynamicSqlKeywords for each DBMS:

ODBCStoreSQLMapper.MyDBMS1.DynamicSqlKeywords=”no”

ODBCStoreSQLMapper.MyDBMS2.DynamicSqlKeywords=”no”

ODBCStoreSQLMapper.MyDBMS3.DynamicSqlKeywords=”no”

Use the following row:

ODBCStoreSQLMapper.*.DynamicSqlKeywords=”no”

10 C U S T O M E RODBC Fine Tuning

How to Override Automated Analytics Automatic Settings

Page 11: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

5.1 Overriding the Full Behavior

It is possible to declare that a DSN should be used like a specific well-known DBMS (see the list of well-known DBMS). All options of the chosen DBMS will be duplicated and used by Automated Analytics. This will prevent you from setting up all the options one by one.

Even when overriding the full behavior, you can modify any ODBC option.

ODBCStoreSQLMapper.<ODBC DSN>.behaviour="<Value>"

Note<Value> can be:

● ORACLE● DB2● SQL SERVER● NETEZZA● TERADATA● MYSQL● ADAPTIVE SERVER IQ● VERTICA● GREENPLUM● HIVE● HANA● SPARK

5.2 Other Options to Override

If the column is checked... the option can be used to...

Customization customize user & DBMS specificities

Backward Compatibility replicate the behavior from previous versions of Automated Analytics

Work-around overcome errors occurring with some ODBC driver

Optimization optimize Automated Analytics' use of the DBMS

Option Name Customiza­tion

Backward Compatibil­ity

Work-

around

Optimiza­tion

AcceptTable x

ODBC Fine TuningHow to Override Automated Analytics Automatic Settings C U S T O M E R 11

Page 12: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

Option Name Customiza­tion

Backward Compatibil­ity

Work-

around

Optimiza­tion

ApplyWorkArounds x x

AutomaticallyExportedFileds x

canAskTableDescription x

CanGenerateConnectorSQLWithSubSelectLimit x

checkConflictInAppendMode x x

CaseSensitive x

Commit Frequency x

ConstantFieldsManagedByValue x

CorrelatedTablesGroupSize x

defaultSchemaForKxenTemporary x

defaultSchemaForMetadata x

DisableDuplicateIdManagementForAggregates x

DynamicAuthorizedChars x

DynamicSQLKeyWords x

GenerateAggregatesFilterInTheOperand x

GuessMode x

HANADataStorageAsColumns x x x

HANATempStorageAsColumns x x x

HANAViewsWithOrder x x

HasFastOrderInSelect x x

IgnorePrefixOnNumeric x x

InitDataManipulationPackage x

KxenBool x

KxenDate x

KxenDateTime x

KxenInteger x

KxenNumber x

KxenString x

KxenUString x

KxLocksName x

LocksPolicy x x

12 C U S T O M E RODBC Fine Tuning

How to Override Automated Analytics Automatic Settings

Page 13: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

Option Name Customiza­tion

Backward Compatibil­ity

Work-

around

Optimiza­tion

ManageDefaultCredentialsAsEmpty x x

ManageForeignKeys x x

MaxConcurrentStatements x

MaxExtraCondUsage x

MaximumLengthOfDBMSString x x

MaximumLengthOfDBMSUString x x

MaxSizeForBlobs x

MetaDataUseFastStarSelect x x

NetezzaUseLimitAll x x x

NotPrimaryKeyRegExp x x

OptimizeMultiInstancesExpressions x

OptimizeMultiInstancesExpressions x

OptimizeMultiInstancesThreshold x

PrefilterAggregatesGroupTable x

PrimaryKeyRegExp x

RejectTable x

SmartCreateTableAndKeys x

SmartSelectForCountOnConnector x

SmartSelectForCountOnselect x

SmartSelectForCountOnTable x

SmartSelectForFullRead x

SmartSelectForGuess x

SmartSelectForLayout x

SQLOnCatalog x x

SQLOnConnect x

SQLOnDisconnect x

SQLOnInitDataManip x

SupportHugeOracleIntegers x x

SupportKxDesc x x

SupportNativeInfos x x x

SupportNativeRead x x

ODBC Fine TuningHow to Override Automated Analytics Automatic Settings C U S T O M E R 13

Page 14: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

Option Name Customiza­tion

Backward Compatibil­ity

Work-

around

Optimiza­tion

SupportPrimaryKeys x x

SupportStatistics x x

SupportTempTables x x x

SupportUnicodeOnConnect x x

SupportUnicodeOnData x x

SupportUnicodeOnMeta x x

TableTypesFilter x x

TSPPersistence x

UserAuthorizedChars x

UserKeyWords x

WarnAboutIssues x

5.2.1 AcceptTable

This option allows you to define a list of tables that must be displayed when the lsSpace function is called. The value of this parameter must be a regular expression.

CautionThis option is deactivated when the option SqlOnCatalog is activated.

ExampleAll tables whose name contains Customer or Product will be displayed in the list of tables offered to the user.

ConnectorContainerSQLBuilder.<MyDSN>.AcceptTable.1=".*Customer.*"

ConnectorContainerSQLBuilder.<MyDSN>.AcceptTable.2=".*Product.*"

5.2.2 ApplyWorkArounds

Some DBMS/ODBC driver combinations have some well-known issues. When possible, at each connection to the DBMS, Automated Analytics tries to detect such combinations in order to fix the issues.

Detection and fixes can be incomplete. The ApplyWorkarounds option (default value is true) allows activating/deactivating this automatic setup. If deactivated, users can still emit their own configuration SQL statements with the SQLOnConnect option.

14 C U S T O M E RODBC Fine Tuning

How to Override Automated Analytics Automatic Settings

Page 15: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

Currently, the application automatically applies workarounds in the following contexts:

Oracle

The statement ALTER SESSION SET NLS_TERRITORY='AMERICA' is emitted. This mainly allows data manipulations to have the same results on all Oracle DBMS instances whatever their default locale.

SQLServer

The statement SET DATEFORMAT YMD is emitted at each connection. This mainly allows data manipulations to have the same results on all SQLServer DBMS instances whatever their default locale.

MySQL

With MySQL ODBC driver, a long period of inactivity corrupts the current DBMS connection without any indication of error. Complex tasks with event logging imply such periods of inactivity.

The statement SET Net_write_timeout=180000 sets up the inactivity time limit to 180000 seconds.

5.2.3 CanAskTableDescription

This parameter value is True if the layout of a table can be directly requested. If not, analyzing the layout of the table will be done by analyzing the result of SQL request: SELECT * FROM <Table>

Depending on DBMS and workload, directly requesting the layout of a table can be heavy.

In Automated Analytics, the default behavior is to analyze the result of a SELECT * FROM <table> WHERE 1=0 and so, the default value is false. The drawback is that some drivers may not return accurate information on fields. For example, whatever the driver, any comment on a field is lost and SQLServer returns SMALLINT as INT and SMALLDATE as DATE.

Example

ODBCStoreSQLMapper.MyDSN.CanAskTableDescription="True"

5.2.4 CanGenerateConnectorSQLWithSubSelectLimit

The Data Manipulation module is able to generate very complex SQL Statements. With complex SQL statements, previewing a result set may be heavy and may take a lot of time. There are several kinds of data

ODBC Fine TuningHow to Override Automated Analytics Automatic Settings C U S T O M E R 15

Page 16: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

manipulations (TSP for example) where it is possible to limit the size of the data to work on and so dramatically shorten the time needed to view first lines of the result set. Such kind of advanced SQL statement is not always possible (it may depend on the DBMS) and is itself very complex to setup.

CanGenerateConnectorSQLWithSubSelectLimit set to false (default depends on the DBMS but is globally true) allows stopping this advanced mechanism and ensures that viewing data will always work even if more slowly.

Example

ODBCStoreSQLMapper.<MyDSN>.CanGenerateConnectorWithSubSelectLimit="false"

5.2.5 CaseSensitiveAutomated Analytics does not use quotes when transmitting table and column names by default. However when these names contain a variation of cases or special characters, it can lead to incorrect queries.

Set the option CaseSensitive to Flase if you do not want the application to add quotes around all table and column names. This option is set to True by default.

Example

Sample CodeThe following code activates the CaseSensitive option for all databases.

ODBCStoreSQLMapper.*.CaseSensitive="true"

Sample CodeThe following code activates the CaseSensitive option for the ODBC source HANA_DB only.

ODBCStoreSQLMapper.HANA_DB.CaseSensitive="true"

5.2.6 checkConflictInAppendModeFor Hive database, this option lets you activate or deactivate the test that checks conflicts between keys appearing both in the input and output application data sets.

The default value is true, which means that the process can only be performed if no key from the input data set is present in the output data set.

Example

ODBCStoreSQLMapper.<ODBC DSN>.checkConflictInAppendMode=false

16 C U S T O M E RODBC Fine Tuning

How to Override Automated Analytics Automatic Settings

Page 17: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

5.2.7 Commit Frequency

This parameter value is 1024 by default. It allows you to define the commit frequency for ODBC.

Example

ODBCStoreSQLMapper.MyDSN.Commit_Frequency=10

5.2.8 CreateNonLoggedTable

On Oracle databases, creating tables with the Non Logged option is a good way to speed up the inserts and index creation. It bypasses the writing of the redo log and significantly improves performance.

So, to increase efficiency, all tables created by the application can be performed without logging when the following option is enabled:

ODBCStoreSQLMapper.<ODBC DSN>.CreateNonLoggedTable=true

5.2.9 DynamicAuthorizedChars

This parameter value is True if the application can ask the DBMS the list of its authorized characters in SQL requests. If an identifier includes a character that is not in this list, the application places the identifier between quotes.

Example

ODBCStoreSQLMapper.MyDSN.DynamicAuthorizedChars="True"

5.2.10 DynamicSQLKeyWords

This parameter value is True if the application can ask the DBMS the list of its SQL reserved keywords.

Example

ODBCStoreSQLMapper.MyDSN.DynamicSQLKeywords="True"

ODBC Fine TuningHow to Override Automated Analytics Automatic Settings C U S T O M E R 17

Page 18: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

5.2.11 GuessMode

By default, when analyzing a table, the application reads the first 100 lines of the table and applies some heuristics to infer the value of each field (for example, an integer field with a few values is guessed as being a nominal variable).

Depending on the DBMS, the layout and the size of the table, reading the first lines of a table may be heavy. When the GuessMode parameter is set to Fast, it allows activating a fast analyze mode that infers the value of a variable only from its type. As these heuristics do not depend on the actual data, this mode is faster than the full standard process.

Code Syntax

ODBCStoreSQLMapper.MyDSN.GuessMode="Fast"

The following table lists the rules used by the Fast Guess Mode to determine a variable value from its type.

DBMS Field Type Variable Value

Integer continuous

Float continuous

String nominal

Date continuous

Datetime continuous

Boolean nominal

5.2.12 HANADataStorageAsColumns, HANATempStorageAsColumns

Prior to rev73 of SAP HANA, columnar storage could not be used as some valid SQL generated by Automated Analytics failed. Row storage was used for all tables generated up to rev73 of SAP HANA. Columnar storage was supported and used after rev73 of SAP HANA.

The HANADataStorageAsColumns and HANATempStorageAsColumns options allow you to change this behavior or standard data table and temporary tables (used by data manipulations).

Example

ODBCStoreSQLMapper.MyDSN.HANADataStorageAsColumns=false

18 C U S T O M E RODBC Fine Tuning

How to Override Automated Analytics Automatic Settings

Page 19: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

5.2.13 HANAViewsWithOrder

Activating this option will automatically add an ORDER BY when accessing the content of SAP HANA views. This allows resultsets to be fully deterministic. As adding sorting has a performance cost, the value is set to false by default.

Example

ODBCStireSQLMapper.MyDSN.HanaViewsWithOrder=true

5.2.14 HasFastOrderInSelect

On some DBMS, ordering rows is very heavy on large tables even if the order is the same as the order of primary keys (typical example is Microsoft Access). This can be an issue when analyzing a table and thus requesting the first lines of the table. This option allows not using an ORDER BY when analyzing the first lines of a table. Default value is true except for Microsoft Access.

5.2.15 IgnorePrefixOnNumeric

Depending on the DBMS, literals may need a prefix and a suffix. For example, a string constant is typically surrounded by single quotes (') and some dates must be prefixed by a hash character (#).

This is usually not needed when using a numeric or integer constant. Prefix and suffix are published by the ODBC driver for each SQL type. However, some ODBC drivers publish an unecessary prefix for several types of constants. SQLServer 2005 for instance publishes $ as the prefix to use when handling a MONEY constant.

This option has been added in order to be compatible with unexpected use cases where this prefix is really mandatory.

The default value is true.

5.2.16 InitDataManipulationPackage, SQLOnInitDataManip

In order to work, the Data Manipulation module makes some suppositions of current options and objects in the DBMS. When and only when needed, each time the data manipulation package is initialized, some SQL statements are transparently emitted to setup this option.

For example, on Oracle, an ALTER SESSION SET NLS_TERRITORY='AMERICA' is emitted to be sure that all functions and operators used are in the proper locale.

When InitDataManipulationPackage is true (default is false), the SQLOnInitDataManip option allows you to specify some other SQL statements to emit and precisely match the current DBMS setup. The syntax used is the same as SQLOnCatalog option.

ODBC Fine TuningHow to Override Automated Analytics Automatic Settings C U S T O M E R 19

Page 20: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

ExampleSQLServer when installed on a Windows server setup with foreign language will use the foreign format for date which may be incompatible with some Data Manipulation operators. Then, one must force the proper date format with a SET DATEFORMAT YMD each time the data manipulation is initialized.

ODBCStoreSQLMapper.<MySQLServer>.InitDataManipulationPackage="true"

ODBCStoreSQLMapper.<MySQLServer>.SQLOnInitDataManip.1=“SET DATEFORMAT YMD"

5.2.17 KxenBool

This SQL type creates a Boolean field.

Example

ODBCStoreSQLMapper.MyDSN.KxenBool="INTEGER"

5.2.18 KxenDate

This SQL type creates a date field.

Example

ODBCStoreSQLMapper.MyDSN.KxenDate="DATETIME"

5.2.19 KxenDateTime

This SQL type creates a datetime field.

Example

ODBCStoreSQLMapper.MyDSN.KxenInteger="TIMESTAMP"

5.2.20 KxenInteger64

This SQL type creates an integer field.

20 C U S T O M E RODBC Fine Tuning

How to Override Automated Analytics Automatic Settings

Page 21: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

Example

ODBCStoreSQLMapper.MyDSN.KxenInteger64="DECIMAL(12,0)"

5.2.21 KxenNumber

This SQL type creates a number field.

Example

ODBCStoreSQLMapper.MyDSN.KxenNumber="NUMBER(15,3)"

5.2.22 KxenString

This SQL type creates a string field. In the following example, %d is a special pattern and will be dynamically replaced by the field length.

Example

ODBCStoreSQLMapper.MyDSN.KxenString="VARCHAR2(%d)"

5.2.23 KxenUString

This SQL type creates a unicode string field. In the following example, %d is a special pattern and will be dynamically replaced by the field length.

Example

ODBCStoreSQLMapper.MyDSN.KxenUString="VARCHAR(%d) UNICODE CHARSET"

5.2.24 KxLocksName

This option allows you to force the usage of a specific name for KxLocks table. This can be useful for example, if the metadata repository is stored in a specific schema of the DBMS or if there is several metadata repositories stored in dedicated schemas.

ODBC Fine TuningHow to Override Automated Analytics Automatic Settings C U S T O M E R 21

Page 22: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

Example

ODBCStoreSQLMapper.MyDSN.KxLocksName="KxenMetaData.KxLocks"

5.2.25 LocksPolicy

When the application needs to access its metadata repository (models, connectors, variable pool, …), a lock is set in order to prevent incoherent states in multi-users contexts.

There are different strategies for the locking process:

Value Behavior

UseKxLocksTable Uses a special table named KxLocks to track and lock all access to metadata repository. This table is stored in the current DBMS and manages all concurrent accesses coming from the current DBMS.

UseUniqueFileInGlobalFolder Indicates the application to track and lock its metadata di­rectory with special files (default names are KxAdmin.lckand KxAdmin.inf). These files are stored in the same directory as the metadata repository.

UsePerModelKxLocksTable Uses an optimized KxLocks table to minimize locking times when many users are concurrently saving models. This is used by default for SAP HANA,Oracle, SQL Server and Teradata.

5.2.26 ManageForeignKeys

The application requests the metadata repository of the DBMS about foreign keys of a table (that is, fields that address a primary key in other tables). Main usage of this information is to automatically offer join keys when designing a data manipulation. Depending on the DBMS and its current load, this request can be heavy and therefore avoided when useless.

There are two possible values:

● true (default): the information is requested from the metadata repository● false: the application bypasses the request

Example

ODBCStoreSQLMapper.MyDSN.ManageForeignKeys="false"

22 C U S T O M E RODBC Fine Tuning

How to Override Automated Analytics Automatic Settings

Page 23: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

5.2.27 MaxConcurrentStatements

The number of concurrent statements is published by the ODBC driver and represents the maximum number of active statements for each ODBC connection allowed by the DBMS. For example, SQLServer can manage only one concurrent statement for each connection, meaning that a SELECT statement returning data and inserting a record requires two separate connections.

Unfortunately, some ODBC drivers incorrectly publish this information. Even though the application has a correct value for each known DBMS, this option, which allows you to force the proper value, has been added to handle an unexpected setup.

Default value is none meaning the value is automatically discovered or forced by the application.

5.2.28 MaximumLengthOfDBMSString

Some DBMS describe string fields with a huge size (more than 2GB) even if all strings actually stored have a standard size. To avoid memory problems, these huge strings are truncated to a maximum size.

The MaximumLengthOfDBMSString option allows you to change the maximum length.

Example

ODBCStoreSQLMapper.MyDSN.MaximumLengthOfDBMSString=5000

5.2.29 MaximumLengthOfDBMSUString

Some DBMS (such as Hive Server) describe Unicode string fields with a huge size (more than 2GB) even if all strings actually stored have a standard size. To avoid memory problems, these huge Unicode strings are truncated to a maximum size. The maximum size possible:

The MaximumLengthOfDBMSUString option allows you to change the maximum length.

Example

ODBCStoreSQLMapper.MyDSN.MaximumLengthOfDBMSUString=5000

5.2.30 MaxSizeForBlob

Some DBMS manage special string types. These types (BLOB,CLOB,LONG VARCHAR,…) can store huge strings (limit is typically 2GB) and are typically used to store documents. Requesting the full value of such fields is very complex, heavy and uses a lot of resources.

ODBC Fine TuningHow to Override Automated Analytics Automatic Settings C U S T O M E R 23

Page 24: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

In order to speed up management of this kind of fields, the application always request the DBMS to convert it in a regular string type with a maximum length of 8000 characters.

The MaxSizeForBlob option allows changing the maximum length.

Example

ODBCStoreSQLMapper.MyDSN.MaxSizeForBlob="255"

5.2.31 MetaDataUseFastStarSelect

Each time a metadata table is read, the SQL statement that is generated uses the pattern SELECT <field1>,<Field2>… FROM <Table>. This allows an OEM to extend metadata with its own information. On some DBMS (Hive Server), such SQL is very slow.

The MetaDataUseFastStarSelect option allows you to generate a SQL using the pattern SELECT * FROM <Table> which may be faster.

Example

ODBCStoreSQLMapper.MyDSN.MetaDataUseStarSelect=true

5.2.32 NetezzaUseLimitAll

For Netezza database, this option lets you activate or deactivate the usage of a SQL tuning option ( “LIMIT ALL”) . This hint allows Netezza ‘s SQL optimizer to execute the SQL requests generated by SAP BusinessObjects Predictive Analytics with efficiency.

The default value is true, which means that this hint is automatically added.

ExampleODBCStoreSQLMapper.<ODBC DSN>.NetezzaUseLimitAll=false

5.2.33 OracleMaxNumberDigitsForInteger

Oracle ODBC driver has difficulty dealing with large integers: an integer bigger than 2^32 bits must be read as a float otherwise ODBC errors are emitted and values are corrupted, even in 64-bit architecture.

As a convenience, when this driver is used, a heuristic is applied on Oracle integer fields like NUMBER(X) where X is the maximum number of decimal digits that can be stored in this field. If X is bigger than 9, the field is handled as a number, otherwise it is an integer. This limit is more conservative and surer than the one used in

24 C U S T O M E RODBC Fine Tuning

How to Override Automated Analytics Automatic Settings

Page 25: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

versions of the application prior to 6.1.3, which was 10. Ten decimal digits may need up to 33.29 binary digits to be stored and therefore, some large values valid for a NUMBER(10) may not fit in a 32-bit integer. As a result, when using Oracle ODBC Driver, Automated Analytics handles NUMBER(10) fields as numbers while versions prior to 6.1.3 handles them as integers.

For backward compatibility, the option OracleMaxNumberDigitsForInteger allows you to switch back to pre-version 6.1.3 behavior.

Values

● 9 (default ): values with more than 9 decimal digits are treated as numbers● 10: values with more than 10 decimal digits are treated as numbers (default behavior for versions prior to

6.1.3)

CautionThis option has an impact only if Oracle ODBC driver is used. Data access for Oracle provided by Automated Analytics does not have this issue.

Example

ODBCStoreSQLMapper.<ODBC DSN>.OracleMaxNumberDigitsForInteger =10

5.2.34 OracleParallelCreationModeOracle Parallel Query (formerly Oracle Parallel Query Option or PQO) allows breaking a given SQL statement up so that its parts can run simultaneously on different processors in a multi-processor machine. This improves performance.

This parameter allows you to set the value of parallelism for all CREATE TABLE statements. Indeed, when a degree value has been specified to the table, this value is used for all SQL statements involving the table.

The possible values are:

● PARALLEL: Oracle selects a degree of parallelism equal to the number of CPUs available. It is the mode by default.

● NO: deactivates the parallelism; only one thread will be used to populate the table● ExtraOptions: extra character string that represents the expected options of parallel threads used in the

parallel operation. This depends on the database used. For details, contact your database administrator.

Example

ODBCStoreSQLMapper.<ODBC DSN>.OracleParallelClause=PARALLEL

ODBCStoreSQLMapper.<ODBC DSN>.OracleParallelClause=NO

ODBCStoreSQLMapper.<ODBC DSN>.OracleParallelClause=PARALLEL(DEGREE 2)

ODBCStoreSQLMapper.<ODBC DSN>.OracleParallelClause=PARALLEL(DEGREE 4 INSTANCES 2)

ODBC Fine TuningHow to Override Automated Analytics Automatic Settings C U S T O M E R 25

Page 26: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

5.2.35 PrimaryKeyRegExp, NotPrimaryKeyRegExp

Some DBMS may not manage the primary keys of a table. In such case, the usual workaround is to read description tables either automatically with an implicit name (KxDesc_XXX) or manually with an explicit name. Moreover, it may be difficult to push these descriptions in those DBMS or difficult to always manage descriptions. Hive server suffers from both issues.

As a facility, the option PrimaryKeyRegExp allows you to describe the field names that will be automatically managed as primary keys. NotPrimaryKeyRegExp allows you to filter the field names that are not primary keys and is applied after the filter PrimaryKeyRegExp.

Example

ODBCStoreSQLMapper.MyDSN.PrimaryKeyRegExp.1=KEY$

ODBCStoreSQLMapper.MyDSN.PrimaryKeyRegExp.2=^KEY

ODBCStoreSQLMapper.MyDSN.PrimaryKeyRegExp.3=ID$

ODBCStoreSQLMapper.MyDSN.PrimaryKeyRegExp.4=^ID

These lines set up the application so that all field names finishing with KEY or IS and all field names starting with KEY or ID are managed as primary keys. This is the default setup of the Hive connection.

5.2.36 RejectTable

This option allows you to define a list of tables that must not be displayed when the lsSpace function is called. The value of this parameter must be a regular expression.

CautionThis option is deactivated when the option SqlOnCatalog is activated.

In the following example, all tables whose name contains Customer or Product will be excluded from the list of tables offered to the user.

ConnectorContainerSQLBuilder.<MyDSN>.RejectTable.1=”.*Customer.*”

ConnectorContainerSQLBuilder.<MyDSN>.RejectTable.2=”.*Product.*”

Database Name Regexp

Oracle SYS\.3*

SYSTEM\.3*

PUBLIC\.3*

26 C U S T O M E RODBC Fine Tuning

How to Override Automated Analytics Automatic Settings

Page 27: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

Database Name Regexp

OWB\.3*

OUTLN\.3*

.*\.SMP_3*_3*

.*\.VDK_.*_.*

.*\.VMQ_.*_.*

WMSYS\..*

SYSMAN\..*

IX\..*

.*\.BIN\$*

OLAPSYS\..*

CTXSYS\..*

DBSNMP\..*

DMSYS\..*

EXFSYS\..*

MDSYS\..*

XDB\..*

Sybase ASE dbo\.sys.*

DB2 DBADMIN\..*

SYSTOOLS\..*

SQL server 2005 sys\..*

INFORMATION_SCHEMA\..*

Sybase IQ DBA\..*

sys\..*

HANA SYS\.*\..*

_SYS\.*\..*

SAP_XS_LM\.*\..*

SAP_HANA_ADMIN\.*\..*

UI\.*\..*

Teradata SysAdmin\..*

SQLJ\..*

DBC.*

DBC.*

Wx2 SYS\..*0

ODBC Fine TuningHow to Override Automated Analytics Automatic Settings C U S T O M E R 27

Page 28: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

5.2.37 SmartCreateTableAndKeys

This option allows the application to generate DBMS primary keys when a variable is declared as a key. Declaring true primary keys makes future usage of the table much more efficient and is also a good practice when designing a DBMS schema.

However, note that primary keys involve much more constraints on the actual values of data: the unicity of the values of the primary must be respected and (depending on the DBMS), the null value for a component of the primary key is forbidden.

The purpose of this option is to keep compatibility with older versions of the application, which were generating simple multiple indexes.

Example

ODBCStoreSQLMapper.MyDSN.SmartCreateTableAndKeys="false"

5.2.38 SmartSelectForCountOnTable, SmartSelectForCountOnSelect, SmartSelectForCountOnConnector, SmartSelectForFullRead, SmartSelectForGuess, SmartSelectForLayout

Automated Analytics generates the smartest possible SQL statement when requesting data. Some specific options of the DBMS SQL are then used. When an option is false, the SQL generated is the most basic one.

Main objects of these enhancements are the following:

● decrease DBMS usage and increase concurrency in the DBMS● speed up the SQL statement by asking for the shortest result set

Options Description Example on SQL Server

SmartSelectForCountOnTable

SmartSelectForCountOnSelect

SmartSelectForCountOnConnector

These options control the generation of advanced statements when a count of records is needed in various contexts.

When requesting the number of re­cords of a table, and SmartSelectForCountOnTable is true (default), the SQL statement generated is: SELECT * FROM <Table> WITH (NOLOCK) other­wise it is a regular SELECT * FROM <table>. The enhanced version uses less resources in SQL Server

28 C U S T O M E RODBC Fine Tuning

How to Override Automated Analytics Automatic Settings

Page 29: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

Options Description Example on SQL Server

SmartSelectForFullRead

SmartSelectForGuess

SmartSelectForLayout

These options manage the generation of advanced SQL statements when a full read of data or a guess must be done. When the number of records to read is already known (that is, in a guess or when a sequential cutting strategy is used), the SQL statement generated is optimized.

When guessing the layout of a table and SmartSelectForGuess is true (de­fault), the SQL statement used is:

SELECT TOP 100* FROM <table> WITH (NOLOCK) which is much more efficient than the regular SELECT * FROM <table>.

5.2.39 SQLOnCatalog

A database may contain thousands of tables, so listing the tables can be very laborious. More, ODBC standard does not define a portable way to list only the tables that are actually usable for the connected user. The parameter SQLOnCatalog contains the SQL request emitted to build the actual list of tables. A long SQL request can be easily specified by adding a sequence number after the keywords SQLOnCatalog, the final SQL request will be the concatenation of all SQLOnCatalogXXX lines. If an execution error occurs, this is reported and Automated Analytics switches to the default behavior and lists all the available tables.

This option allows building a list of tables that are small and of interest for the final user.

There is two main kinds of SQL requests that may be used:

● Tuning of the system catalogs:○ The system catalogs of the database are requested and some filtering is added in order to build a

shorter and more user-oriented list of tables. The SQL request should be built with the help of the Database Administrator.

● Tuning at application level:○ The list of usable tables is explicitly stored in a dedicated table that is maintained by another

operational process or another application. This can be done without knowing the structure of system catalogs that may be complex.

5.2.39.1 Format of the SQL Request to Use for SQLOnCatalog

The following table lists the format of all keywords in the SQL request when using the option SQLOnCatalog.

In the SQL request, the special %USER%, %SQLUSER%, %KXENUSER%, %OSUSER%, %PASSWAORD%, %KXENVERSION%, %KXEN32% and %DSN% keywords are searched and if existing are replaced by:

Keyword Description

%USER% Current SQL user login (deprecated replaced by %SQLUSER% now)

%SQLUSER%,%SQLUSER_MAJUS%,%SQLUSER_MINUS%

Current SQL user login as provided by user, in uppercase, in lowercase

ODBC Fine TuningHow to Override Automated Analytics Automatic Settings C U S T O M E R 29

Page 30: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

Keyword Description

%KXENUSER%,%KXENUSER_MAJUS%,%KXENUSER_MINUS%

Current Physical Automated Analytics user login as provided by user, in uppercase, in lowercase

%OSUSER%,%OSUSER_MAJUS%,%OSUSER_MINUS%

Current Physical Automated Analytics user login as provided by user, in uppercase, in lowercase

%PASSWORD% Current SQL password

%KXENVERSION% Current Automated Analytics version

%KXEN32% Indicate if the current Automated Analytics version is in 32-bit or in 64-bit (TRUE for a 32-bit version, FALSE for a 64-bit version)

%DSN% Name of the current ODBC connection

NoteThese macros are only used by SQLonCatalog, SQLOnConnect, defaultSchemaFoMetadata and defaultSchemaForKxenTemporary.

The only constraint of the resulting data set is that it must have at least two fields of string type:

● The first one will give the Schema name● The second one will give the Table name

ExampleSince SQL Server 2005, the list of user tables can be obtained with:

ODBCStoreSQLMapper.MyDSN.SQLOnCatalog1="select table_schema as SchemaName, table_name as TableName from information_schema.tables order by SchemaName,TableName"

The list of user table names that starts with the keyword 'ForModeling' can be obtained with:

ODBCStoreSQLMapper.MyDSN.SQLOnCatalog1="select table_schema as SchemaName, table_name as TableName from information_schema.tables"

ODBCStoreSQLMapper.MyDSN.SQLOnCatalog2=" WHERE (name LIKE 'ForModeling%' ) ORDER BY SchemaName,TableName"

If the list of available tables is stored in the table TablesForModeling, it can be processed with the lines:

ODBCStoreSQLMapper.MyDSN.SQLOnCatalog=“SELECT <Field1>,<Field2> FROM TablesForModeling ORDER BY <Field1>,<Field2>"

For Teradata, the list of tables created by the current user can be obtained with:

ODBCStoreSQLMapper.MyDSN.SQLOnCatalog1="SELECT TRIM(DataBaseName),TRIM(TableName) FROM dbc.Tables WHERE CreatorName='%USER%' AND Tablekind in ('T','V') ORDER BY DataBaseName, TableName"

30 C U S T O M E RODBC Fine Tuning

How to Override Automated Analytics Automatic Settings

Page 31: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

For Teradata, the list of readable and editable tables for current user can be obtained with:

ODBCStoreSQLMapper.MyDSN.SQLOnCatalog1="select distinct TRIM(DatabaseName), TRIM(TableName) from dbc.ALLRIGHTS where (AccessRight = 'R' or AccessRight = 'U' or AccessRight = 'I' or AccessRight = 'IX' or AccessRight = 'RF' ) and UserName = ‘%SQLUSER%"

For Oracle, the list of tables and views created by the current user can be obtained with:

ODBCStoreSQLMapper.MyDSN.SQLOnCatalog1="select '%SQLUSER%',t_Name from ( select TABLE_NAME as t_Name from USER_TABLES union SELECT VIEW_NAME as t_Name FROM USER_VIEWS) order by t_Name"

5.2.40 SQLOnConnect

This parameter contains the SQL request emitted just after a successful connection to the data source. Several requests can be emitted by adding a sequence number after SqlOnConnect. An execution error in a SQL request is not reported and does not stop the connection process. A typical use of this type is to configure DBMS session options that are not available with ODBC (Ex session charset for Oracle)

Example

ODBCStoreSQLMapper.MyDSN.SQLOnConnect1="ALTER SESSION SET NLS_CHARSET xxxxxx"

ODBCStoreSQLMapper.MyDSN.SQLOnConnect2="ALTER SESSION SET DATE TIME FORMAT \"YYYY-MM-DD HH:MM:SS\""

An advanced use of this type is to configure DBMS session options according to the %KXENUSER% login.

ExampleIt is possible to automatically redirect all DBMS connection to a default DBMS schema where user has only a read data access.

Oracle:

ODBCStoreSQLMapper.MyDSN.SQLOnConnect="ALTER SESSION SET CURRENT_SCHEMA=%KXENUSER%"

MySQL:

ODBCStoreSQLMapper.MyDSN.SQLOnConnect="USE %KXENUSER%"

ODBC Fine TuningHow to Override Automated Analytics Automatic Settings C U S T O M E R 31

Page 32: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

5.2.41 SQLOnDisconnect

This parameter contains the SQL query emitted just before a connection to the data source is closed. Several queries can be emitted by adding a sequence number after SqlOnConnect. An execution error in an SQL query is not reported and does not stop the connection process.

Example

ODBCStoreSQLMapper.MyDSN.SQLOnDisconnect1="drop table XXX"

5.2.42 SupportHugeOracleIntegers

Oracle is able to manage huge integers up to 38 decimal digits that cannot fit in 64-bit integers. Even storing such huge values in floating numbers is not enough (refer to the option OracleMaxNumberDigitsForInteger): precision can be lost and values managed by Automated Analytics may be corrupted. Such a precision loss is a problem when these integers are used as primary keys and the application has to write them back.

In order to avoid precision loss with such huge primary key values, this option forces the application to manage them as strings. Strings are not subject to any truncation or precision loss when read from Oracle or written back to Oracle. Limiting this option to primary keys also ensures that models are not impacted, since primary keys are not managed as input for predictive models.

The default value of this option is false. This option should be activated only when primary keys are defined as Oracle default integers (NUMBER(38)) and actually storing large values.

ExampleODBCStoreSQLMapper.<ODBC DSN>. SupportHugeOracleIntegers =true

5.2.43 SupportKxDesc

Each time a DBMS table is analyzed, the application tries to read a description stored in a table named KxDesc_<tableName>. Depending on the DBMS, this feature can slow down the analyze process even if no KxDesc description is available.

The SupportKxDesc option allows you to suppress this feature.

Example

ODBCStoreSQLMapper.MyDSN.SupportKxDesc=false

32 C U S T O M E RODBC Fine Tuning

How to Override Automated Analytics Automatic Settings

Page 33: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

CautionAt this time, Hive server is the only DBMS for which this option would be useful. For backward compability reason, this option is always true, even for Hive server.

5.2.44 SupportNativeInfos

When creating an applyOut table, the application adds primary key fields of the applyIn table. By doing so, the application tries its best to replicate exactly the SQL type (with all subtle variations specific to current DBMS) of the input field with information provided by the current ODBC driver.

Depending on unexpected field/DBMS/driver/OS combination, this reconstruction of the proper SQL type can be incorrect. SupportNativeInfos allows deactivating this reconstruction mechanism.

If deactivated, any field cloned from an input field uses a basic and safe type.

In practical terms, SupportNativeInfos is deactivated for the application when running on UNIX and connected to 'minor' DBMS or Windows Only DBMS such as SAND, Wx2, SQLServer, Microsoft Access.

5.2.45 SupportNativeRead

Historically, Automated Analytics used to request ODBC drivers to return data in string format and converted strings in the proper native type. For example, the value 123 was received as string "123" and converted to the true integer constant 123.

This, while safer, used more network and CPU resources, so the application now requests the ODBC driver to return the data in their native format (which is typically more concise) and no longer needs to convert them.

Unfortunately, some combinations of ODBC drivers/ DBMS do not manage native values properly. In that case, SupportNativeRead allows you to force reading data values in string format.

SupportNativeRead is set to false only on MySQL when the DBMS version is prior to 5.0 and when the table to read includes a date type.

5.2.46 SupportPrimaryKeys and SupportStatistics

Some DBMS (Microsoft Access) are not able to publish the primary keys of a table. In such a case, the application tries to request the statistics of a table, finds the first unique index and promotes the associated fields to primary keys.

SupportPrimaryKeys indicates the DBMS is able to report primary keys. SupportStatistics indicates the DBMS manage statistics on a table.

ODBC Fine TuningHow to Override Automated Analytics Automatic Settings C U S T O M E R 33

Page 34: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

5.2.47 SupportTempTables

Complex data manipulations may use temporary tables. Some DBMS have the temporary table feature (tables stored in a special space and automatically deleted) and the application has validated its usage. As the temporary space usage can be constrained by IT policy, the option SupportTempTables allows you to force the application to use its own mechanism for temporary tables. In such a case, the temporary tables are regular tables and the application handles their destruction..

The option SupportTempTables is set to true for SQLServer and Teradata.

NoteEven if the temporary table mechanism is available on Oracle, it has not been validated with Automated Analytics.

5.2.48 SupportUnicodeOnConnect

The ODBC API allows establishing connections to DBMS using Unicode parameters as well as native character set for the user and password.

Tests done have demonstrated (especially on UNIX) that the proper use of the Unicode option may depend on complex setup of the DBMS/client software.

By default, the application establishes the connection with the native character set parameters and then requests the Unicode capabilities of the current configuration. The option SupportUnicodeOnConnect (default value false) allows you to force the use of Unicode for the user and password.

5.2.49 TableTypesFilter

By default, SAP BusinessObjects Predictive Analytics displays the list of tables and views. This option allows you to limit this list. The default value is TABLE,VIEW.

Sample CodeThe following code will display the list of tables only.

ODBCStoreSQLMapper.*.TableTypesFilter=TABLE

ExampleOracle manages the specific concept of SYNONYMS. Any object in Oracle can have a synonym, which typically has a simpler name than the original object. For performance reasons, the default behavior on Oracle is not to manage this list of synonyms, but you can activate it by adding SYNONYM to this option.

ODBCStoreSQLMapper.*.TableTypesFilter="TABLE,VIEW,SYNONYM"

34 C U S T O M E RODBC Fine Tuning

How to Override Automated Analytics Automatic Settings

Page 35: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

5.2.50 Unicode Management

You can find Unicode strings in two places in the DBMS:

● the data records,● the table names or field names.

You can encounter the following ODBC drivers/ODBC driver manager/DBMS configurations:

● the records manage Unicode, but not the table/field names,● the records and the table/field names manage Unicode,● an erroneous answer is returned when reporting about Unicode features.

SupportUnicodeOnMeta / SupportUnicodeOnData

Two Unicode options can be associated to a data source:

● SupportUnicodeOnData describes the kind of character conversion supported by the ODBC driver/ODBC Driver Manager/DBMS in the record data.

● SupportUnicodeOnMeta describes the kind of character conversion supported by the ODBC driver/ODBC Driver Manager/DBMS in the object names (tables, fields, indexes).

Default Values for SupportUnicodeOnData / SupportUnicodeOnMeta

The default values for these options follows the standard application behavior related to MultiLanguageIsDefault option:

● MultiLanguageIsDefault = no (default)○ This behavior is compatible with previous versions: input/output is done in native character sets (client

code page). Automated Analytics ODBC layout works in conjunction with mini drivers in order to read and emit characters in client code page.

● MultiLanguageIsDefault = yes○ All input/output are done in Unicode (UTF-16) characters. Automated Analytics ODBC layout works in

conjunction with mini drivers in order to read and emit characters in UTF-16 format.

The MultiLanguageIsDefault option is a global switch to the full Automated Analytics engine and can be overloaded by SupportUnicodeOnMeta / SupportUnicodeOnData options on every DSN.

Available Character Conversions

The values for SupportUnicodeOnData / SupportUnicodeOnMeta can be:

● UTF16 , yes , 1 , on , true , y , t : the ODBC Driver/ODBC Driver Manager/DBMS will emit characters in UTF-16 format meaning Automated Analytics must do a UTF-16 to UTF-8 conversion.

ODBC Fine TuningHow to Override Automated Analytics Automatic Settings C U S T O M E R 35

Page 36: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

● UTF8 : the ODBC Driver/ODBC Driver Manager/DBMS will emit characters in UTF-8 format. Automated Analytics will not do any conversion.

● Any other value means the ODBC Driver/ODBC Driver Manager/DBMS will emit characters in client code page. Automated Analytics must do a code page to UTF-8 conversion

UTF-8 is a special value as it is not ODBC compliant. At this time, only Teradata ODBC driver for Teradata DBMS 2R5.1 Beta needs this special value. The associated mini driver manages it.

5.2.51 UserAuthorizedChars

This parameter contains an explicit list of authorized characters. This list is concatenated to the standard ANSI list, which is always used.

Example

ODBCStoreSQLMapper.MyDSN.UserAuthorizedChars="~[]"

5.2.52 UserKeywords

This parameter contains an explicit list of SQL keywords separated by a comma (,). This list is concatenated to the standard ANSI list of SQL key words, which is always used. The application adds quotes around any table or field name appearing in this list.

Example

ODBCStoreSQLMapper.MyDSN.UserKeywords="SCORE,TRIGGER,ID"

5.2.53 WarnAboutIssues

Automated Analytics tries to detect partially supported configuration of DBMS/ODBC drivers. In such a case, a warning is emitted about potential issues. As with ApplyWorkArounds, such detection can be inappropriate. WarnAboutIssues (default value is true) allows the warning to be hidden if false.

At this time, such warnings are only emitted for Teradata in two cases:

● Old Windows demonstration version of Teradata (05.00.0011) is used.● Incoherent Unicode configuration of Automated Analytics and Unicode configuration of ODBC connection

are detected: Automated Analytics in Unicode configuration must use a Teradata ODBC driver in Unicode configuration.

36 C U S T O M E RODBC Fine Tuning

How to Override Automated Analytics Automatic Settings

Page 37: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

5.3 Schema Definition

When overriding the application, you can set a database to have its structure defined in a schema.

This works for all supported databases except for Access and Mysql5 which do not support schema definition.

In addition, on Sybase ASE, a user must have the role SA to create and drop tables.

5.3.1 defaultSchemaForKxenTemporary

All temporary metadata will be created in this schema and the life span of metadata is completely managed by Automated Analytics.

The same set of macros available with SQLOnCatalog options can be used too. For more information on these options, you can refer to Format of the SQL Request to Use for SQLOnCatalog [page 29].

ExampleODBCStoreSQLMapper.*.defaultSchemaForKxentemporary=%SQLUSER_MAJUS% will use the user's private schema to store all temporary tables.

NoteFor all HANA connections, the default value for defaultSchemaForKxenTemporary is %SQLUSER_MAJUS%, meaning that all temporary tables that may be needed by Automated Analytics are stored in the private schema of the current user.

5.3.2 defaultSchemaForMetadata

You can set a default schema name for all Automated Analytics metadata spaces.

The list of these metadata are:

● KxAdmin● KxInfos● KxLocks● KxCommunities0● KxLinks0● KxNodes0● KxOlapCube0● ConnectorsTable● KxMapping● KxVariables● KxCatTranslation

ODBC Fine TuningHow to Override Automated Analytics Automatic Settings C U S T O M E R 37

Page 38: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

● KXENMeta.KxContStruct● KXENMeta.KxNomStruct● KXENMeta.KxOrdStruct

The same set of macros available with SQLOnCatalog options can be used too. For more information on these options, you can refer to Format of the SQL Request to Use for SQLOnCatalog [page 29]

ExampleODBCStoreSQLMapper.*.defaultSchemaForMetadata=%SQLUSER_MAJUS% will use the user's private schema to store all metadata.

NoteWhen saving a model or a data manipulation, if the key defaultSchemaForMetadata is specified and if the model or the data manipulation do not have a schema definition then the specified schema will be used.

NoteFor all HANA connections, the default value for defaultSchemaForMetadata is %SQLUSER_MAJUS%, meaning that all temporary tables that may be needed by Automated Analytics are stored in the private schema of the current user.

5.4 Data Manipulation SQL Generation Options

These options are used to drive the data manipulation SQL code generator. Each declared ODBC data source can have its own overrides set as in the ODBC driver options case.

5.4.1 AggregatesAsCorrelated

This option allows you to force or disable the generation of standard aggregates (min max, count, avg) using correlated tables instead of SELECT sub queries. Some data bases ignore this option when they only support one of the two forms. For instance MySQL only supports the SELECT sub queries, whereas Teradata handles only correlated tables.

NoteCurrently, no warning is given when such a situation occurs.

Possible values:

● System (default): the system automatically selects which kind of aggregates generation is used.● Forced: correlated tables are used when the RDBMS allows it.● Disabled: SELECT sub queries are used when the RDBMS allows it.

38 C U S T O M E RODBC Fine Tuning

How to Override Automated Analytics Automatic Settings

Page 39: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

NoteSee section Supported Aggregates SQL Forms for the list of databases supporting each form.

Example

ConnectorContainerSQLBuilder.<MyDSN>.AggregatesAsCorrelated="Disabled"

Supported Aggregates SQL Forms

Standard First/Last Exists

Access Sub query only Sub query only Sub query only

SQLServer Correlated tables as default Correlated tables as default Sub query only

Oracle Correlated tables as default Correlated tables only Sub query only

Teradata Correlated tables only Correlated tables only Correlated tables only

DB2 Sub query only Correlated tables only Sub query only

MySQL Sub query only Sub query only Sub query only

PostgreSQL Correlated tables as default Correlated tables only Correlated tables only

SybaseIQ Correlated tables only Correlated tables only Correlated tables only

Vertica Correlated tables only Correlated tables only Correlated tables only

Netezza Correlated tables only Correlated tables as default Correlated tables as default

Caption:

● Sub query only: on this database, the application generates aggregates using only the sub-query form.● Correlated tables only: on this database, the application generates aggregates using only correlated tables● Correlated tables as default: on this database, the application generates correlated tables by default, but if

forced it can generate SELECT sub queries when possible.

5.4.2 AggregatesAsCorrelated_ExistsThis option has the same effect as AggregatesAsCorrelated, but it affects the Exists aggregate.

Possible values:

● System (default): the system automatically selects which kind of aggregates generation is used.● Forced: correlated tables are used when the RDBMS allows it.● Disabled: SELECT sub queries are used when the RDBMS allows it.

NoteSee section Supported Aggregates SQL Forms for the list of databases supporting each form.

ODBC Fine TuningHow to Override Automated Analytics Automatic Settings C U S T O M E R 39

Page 40: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

Example

ConnectorContainerSQLBuilder.<MyDSN>.AggregatesAsCorrelated_Exists="Forced"

5.4.3 AggregatesAsCorrelated_FirstLast

This option has the same effect as AggregatesAsCorrelated, but it affects the First/Last aggregates.

Possible values:

● System (default): the system automatically selects which kind of aggregates generation is used.● Forced: correlated tables are used when the RDBMS allows it.● Disabled: SELECT sub queries are used when the RDBMS allows it.

NoteSee section Supported Aggregates SQL Forms for the list of databases supporting each form.

Example

ConnectorContainerSQLBuilder.<MyDSN>.AggregatesAsCorrelated_FirstLast="Forced"

5.4.4 AllowFiltersInIntermediatesSteps

In a multi-steps data manipulation, the global filter may be simple enough to be applied to some intermediate steps. By default, Automated Analytics does not forward any filter, even in simple situations. This configuration key instructs the application to apply the global filter to the intermediate steps that can evaluate it, when the filter does not depend on an aggregate.

Possible values:

● true (default)● false

Example

ConnectorContainerSQLBuilder.<MyDSN>.AllowFiltersInInterdiatesSteps="false"

40 C U S T O M E RODBC Fine Tuning

How to Override Automated Analytics Automatic Settings

Page 41: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

5.4.5 AutomaticallyExportedFields

Explorer objects, such as entities or time-stamped populations, are configured to expose only a defined set of fields. This option allows specifying if other fields should be visible to data manipulations users.

Possible values:

● KxTarget;KxWeight (default)● name of the fields to be made visible separated by semi-colons

Example

ConnectorContainerSQLBuilder.<MyDSN>.AutomacallyExportedfields=“MyColumn1;MyColumn2;MyColumn3”

5.4.6 ConstantFieldsManagedByValue

This parameter allows optimizing the use of constant-valued fields. When this option is activated, a data manipulation having to expose a constant-valued field does so by propagating up its actual value and informing upper data manipulations that the concerned field is constant and thus that its value has to be used anywhere the field name is referenced. This allows some data manipulations to be executed 10 times faster.

Possible values:

● true (default)● false

Example

ConnectorContainerSQLBuilder.<MyDSN>.ConstantFieldsManagedByValue="false"

5.4.7 CorrelatedTablesGroupSize

When the GenerateAggregatesFilterInTheOperand option is set to System, the aggregates sharing the same time window but yielding different extra filter conditions are grouped together. This parameter allows you to set the maximum number of aggregates that a given group may contain.

The default value is 7.

Example

ConnectorContainerSQLBuilder.<MyDSN>.CorrelatedTablesGroupSize=5

ODBC Fine TuningHow to Override Automated Analytics Automatic Settings C U S T O M E R 41

Page 42: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

5.4.8 DisableDuplicateIdManagementForAggregatesTo deal with reference tables that may contain duplicate identifiers, the application now generates more complex SQL statements. On some databases this may lead to poorly performing SQL requests. When the reference table is known not to have duplicate identifiers, the user can get rid of the overhead implied by this extra processing.

Possible Values:

● true● false (default)

Example

ConnectorContainerSQLBuilder.<MyDSN>.DisableDuplicateIdManagementForAggregates="true"

5.4.9 EnforceCommonTableExpressionUsageIn data mining, you use Common Table Expression (CTE) to optimize a complex sub-data manipulation.

The option EnforceCommonTableExpressionUsage activates the SQL "with clause" if the following conditions are met:

● The backend database supports the "with clause" feature.● The data manipulation is used as reference table for an aggregate.

The use of CTE is controlled by the EnforceCommonTableExpressionUsage option. The following table lists its possible values.

Value Description

Disabled CTEs are not generated.

Enabled Any sub-data manipulation that is not captured by a persis­tence (as view or table) rule are optimized using a dedicated CTE.

Auto The sub-data manipulations used as reference table for some aggregates will be optimized through a “with clause”.

TipTo activate this option by default for SAP HANA at a DSN level in the configuration file, use the following statement:

ConnectorContainerSQLBuilder.<MyDSN>.EnforceCommonTableExpressionUsage ="Forced".

To completely deactivate the use of CTE at a DSN level for SAP HANA, use the following statement:

ConnectorContainerSQLBuilder.<MyDSN>.CTEAllowed=false.

42 C U S T O M E RODBC Fine Tuning

How to Override Automated Analytics Automatic Settings

Page 43: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

5.4.10 ForwardVisbleKeysToIntermediateSteps

When a data manipulation is too complex to be expressed as single SELECT statements, Automated Anaytics automatically splits it in smaller steps that create intermediate tables. This leads to situations where key columns in one step/table cannot be considered as keys in another one (typically, due to a merge). To cope with most cases, the application has implemented a strategy that filters out unused keys columns.

ForwardVisibleKeysToIntermediateSteps configuration key allows preserving visible key columns even if there are not used.

Possible values:

● true (default)● false

Example

ConnectorContainerSQLBuilder.<MyDSN>.ForwardVisibleKeysToIntermediateSteps="false"

5.4.11 GenerateAggregatesFilterInTheOperand

On databases such as Teradata, Oracle, and DB2, Automated Analytics formulates aggregates as correlated or derived table expressions. Each of these tables gathers aggregates done over the same rows set. A rows set is defined, on one hand, by the key columns, and on the other hand, by the filtering condition. The filter embeds the time window specification (when provided) along with an additional predicate.

This option allows generating the predicate in such a way that it is taken into account without negatively impacting the filtering condition. That is, leading to related pivoted aggregates being generated in different tables.

Values

● System (default): The system decides whether or not to add the extra predicate to the filtering condition based on the number of related aggregates. This value can be set through the MaxExtraCondUsage parameter.

● Forced: the extra predicate is never included in the the filter expression● Disabled: the extra predicate is always included in the the filter expression

Example

ConnectorContainerSQLBuilder.<MyDSN>.GenerateAggregatesFilterInOperand="Forced"

ODBC Fine TuningHow to Override Automated Analytics Automatic Settings C U S T O M E R 43

Page 44: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

5.4.12 GenerateSerialMerge

For the sake of clarity, the notation (T1,T2) will stand for the operation of (left outter) joining T1 and T2 on with join conditions.

In a long chain/sequence of tables joins, for instance ((T1,(T2,T4)), (T3,T4)), some of the join conditions may be generated right after the join or at the end of the query without any impact on the resulting rows set. In some cases, end-positioned join conditions will negatively impact the performance of the generated SQL. This option allows specifying the position of the join conditions.

Possible values:

● System (default): the system automatically selects the preferred form according to the experiments on the concerned data base.

● Forced: the join conditions are generated right after the join operation.● Disabled: the join conditions are generated at the end of the join sequence.

Example

ConnectorContainerSQLBuilder.<MyDSN>.GenerateSerialMerge="Forced"

5.4.13 MaxExtraCondUsage

When the GenerateAggregatesFilterInTheOperand option is set to System, the aggregates sharing the same time window but yielding different extra filter conditions are grouped together if their number is over a given threshold. This parameter sets that threshold.

The default value is 5.

ExampleConnectorContainerSQLBuilder.<MyDSN>.MaxExtraCondUsage=5

5.4.14 OptimizeExpressionsBasedOnDM

In a data manipulation, expressions that are referenced several times are factorized for efficiency purposes. When these expressions use fields coming from a joined/sub data manipulation, the kernel may fail to correctly factorize them. In that case, this option allows excluding them from the factorization process.

NoteThis option can only be activated when the option OptimizeMultiInstancesExpressions is on.

44 C U S T O M E RODBC Fine Tuning

How to Override Automated Analytics Automatic Settings

Page 45: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

Possible values:

● true (default)● false

Example

ConnectorContainerSQLBuilder.<MyDSN>.OptimizeExpressionsBasedOnDM="false"

5.4.15 OptimizeMultiInstancesExpressions

In a data manipulation, two strategies can be used when a computed field/expression is referenced more than once:

● the standard strategy , where each reference is replaced by the full SQL definition of the concerned computed field so that the computation takes place several times.

● the optimized strategy , where a temporary column is computed (once) using the field SQL definition. Then each subsequent reference to the computed field will be replaced by a reference to the new column.

Possible Values

● System (default): the strategy is automatically selected by the system. By default, if a field is referenced more than once, the optimized strategy is used.

● Forced: the optimized strategy is used.● Disabled: the standard strategy is used.

Example

ConnectorContainerSQLBuilder.<MyDSN>.OptimizeMultiInstancesExpressions="Forced"

5.4.16 OptimizeMultiInstancesThreshold

When multi-referenced expressions should be optimized (see OptimizeMultiInstancesExpressions), this parameter specifies the maximum number of reuses before this optimization takes place.

Default Value:

● 2

Example

ConnectorContainerSQLBuilder.<MyDSN>.OptimizeMultiReferencesThreshold=3

ODBC Fine TuningHow to Override Automated Analytics Automatic Settings C U S T O M E R 45

Page 46: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

5.4.17 PrefilterAggregatesGroupTable

The table expressions grouping pivoted aggregates together have the ability to filter the rows seen by these aggregates. Since each aggregate proceeds only the matching rows, this pre-filtering can be left off: that is the current default behavior. It can be changed using the PrefilterAggregatesGroupTable configuration key.

Pre-filtering often involves non-indexed columns, which consequently leads to full scans. When all the columns used in the aggregates filters or in the join conditions are known to be indexed, switching to pre-filtering may have positive performance impacts.

Possible values:

● true● false (default)

Example

ConnectorContainerSQLBuilder.<MyDSN>.PrefilerAggregatesGroupTable="true"

5.4.18 SQLAsSQLScript

This option allows you to force or deactivate the decomposition of a data manipulation into smaller intermediate steps (automatically determined by the system).

Possible values:

● System (default): depending on the relative complexity of the data manipulation, the system chooses whether to activate the decomposition.

● Forced: the data manipulation is decomposed into intermediate steps regardless of its complexity.● Disabled: the data manipulation is never decomposed into intermediate steps no matter how complex it

could be. Be very careful when selecting this value.

Example

ConnectorContainerSQLBuilder.<MyDSN>.SQLAsSQLScript="Disabled"

5.4.19 TSPPersistence

In operational environment, analytical datasets generate complicated SQL that some RDBMS optimizer may fail to analyze correctly. This has been observed especially when filtered time-stamped populations are involved. To circumvent this, materializing the time-stamped population generally helps the optimizer make better choices for the execution plan. This option helps controlling that behavior.

Possible Values

46 C U S T O M E RODBC Fine Tuning

How to Override Automated Analytics Automatic Settings

Page 47: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

● System (default): the system uses specific rules to automatically decide whether to apply the materialization. For the time being, all filtered time-stamped populations are materialized.

● Forced: all time-stamped populations are materialized● Disabled: time-stamped populations are never materialized

Example

ConnectorContainerSQLBuilder.<MyDSN>.TSPPersistence="Forced"

5.4.20 UnusedKeysInIntermediatesForOptim

For optimization purposes, a given multi-referenced expressions factorization takes place only when the table on which it is computed has keys columns.

In multi-steps data manipulation, to avoid violating physical keys non-nullity and uniqueness constraints, the system applies specific rules filtering out keys that are not required in intermediates tables. This may lead to situations where multi-referenced expressions are left non-factorized.

This option instructs the system not to exclude from intermediate tables key columns that may be used in the optimization process.

Possible values:

● true (default)● false

Example

ConnectorContainerSQLBuilder.<MyDSN>.UnusedKeysInIntermediatesForOptim="false"

ODBC Fine TuningHow to Override Automated Analytics Automatic Settings C U S T O M E R 47

Page 48: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

Important Disclaimers and Legal Information

Coding SamplesAny software coding and/or code lines / strings ("Code") included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended to better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, unless damages were caused by SAP intentionally or by SAP's gross negligence.

AccessibilityThe information contained in the SAP documentation represents SAP's current view of accessibility criteria as of the date of publication; it is in no way intended to be a binding guideline on how to ensure accessibility of software products. SAP in particular disclaims any liability in relation to this document. This disclaimer, however, does not apply in cases of willful misconduct or gross negligence of SAP. Furthermore, this document does not result in any direct or indirect contractual obligations of SAP.

Gender-Neutral LanguageAs far as possible, SAP documentation is gender neutral. Depending on the context, the reader is addressed directly with "you", or a gender-neutral noun (such as "sales person" or "working days") is used. If when referring to members of both sexes, however, the third-person singular cannot be avoided or a gender-neutral noun does not exist, SAP reserves the right to use the masculine form of the noun and pronoun. This is to ensure that the documentation remains comprehensible.

Internet HyperlinksThe SAP documentation may contain hyperlinks to the Internet. These hyperlinks are intended to serve as a hint about where to find related information. SAP does not warrant the availability and correctness of this related information or the ability of this information to serve a particular purpose. SAP shall not be liable for any damages caused by the use of related information unless damages have been caused by SAP's gross negligence or willful misconduct. All links are categorized for transparency (see: http://help.sap.com/disclaimer).

48 C U S T O M E RODBC Fine Tuning

Important Disclaimers and Legal Information

Page 49: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

ODBC Fine TuningImportant Disclaimers and Legal Information C U S T O M E R 49

Page 50: ODBC Fine Tuning - SAP · PDF fileCUSTOMER SAP BusinessObjects Predictive Analytics 3.1 2017-10-26 ODBC Fine Tuning Automated Analytics Configuration Guide

go.sap.com/registration/contact.html

© 2017 SAP SE or an SAP affiliate company. All rights reserved.No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company. The information contained herein may be changed without prior notice.Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary.These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names mentioned are the trademarks of their respective companies.Please see http://www.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices.