Professional Documents
Culture Documents
Hyperion® Essbase® - System 9: SQL Interface Guide
Hyperion® Essbase® - System 9: SQL Interface Guide
RELEASE 9.3.1
Essbase SQL Interface Guide, 9.3.1 Copyright 1998, 2007, Oracle and/or its affiliates. All rights reserved. Authors: Rosemary Peters The Programs (which include both the software and documentation) contain proprietary information; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited. The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. This document is not warranted to be error-free. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose. If the Programs are delivered to the United States Government or anyone licensing or using the Programs on behalf of the United States Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the Programs, including documentation and technical data, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement, and, to the extent applicable, the additional rights set forth in FAR 52.227-19, Commercial Computer Software--Restricted Rights (June 1987). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065. The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup, redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and we disclaim liability for any damages caused by such use of the Programs. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. The Programs may provide links to Web sites and access to content, products, and services from third parties. Oracle is not responsible for the availability of, or any content provided on, third-party Web sites. You bear all risks associated with the use of such content. If you choose to purchase any products or services from a third party, the relationship is directly between you and the third party. Oracle is not responsible for: (a) the quality of third-party products or services; or (b) fulfilling any of the terms of the agreement with the third party, including delivery of products or services and warranty obligations related to purchased products or services. Oracle is not responsible for any loss or damage of any sort that you may incur from dealing with any third party.
Contents
Chapter 1. Introducing Essbase SQL Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Understanding Essbase SQL Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Preparing for Using SQL or Relational Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Chapter 2. Configuring a Data Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Configuring a Data Source on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Configuring a Data Source on UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Editing the odbc.ini File for Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Example: Editing odbc.ini for DB2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Chapter 3. Preparing Multiple-Table Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Understanding Multiple-Table Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Understanding Two Methods for Multiple-Table Data Preparation . . . . . . . . . . . . . . . 9 Choosing a Preparation Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Understanding Security Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Preparing Data from Multiple Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Chapter 4. Loading SQL Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Understanding Data Loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Using Substitution Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Understanding the Rules for Substitution Variables . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Creating and Using Substitution Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Loading Relational Data Using Essbase SQL Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Summary of Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Creating the Data Load Rules File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Selecting the SQL Data Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Creating SQL Queries (optional) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Loading the Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Chapter 5. Using Non-DataDirect ODBC Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Configuring a Non-DataDirect Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Creating a Configuration File for Non-DataDirect Drivers . . . . . . . . . . . . . . . . . . . . . . . . 18 Including the Minimum Required Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Contents
iii
Finding a Driver Name on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Finding a Driver Name on UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Configuring Non-DataDirect Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Support for Non-DataDirect Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Appendix A. Enabling Faster Data Loads from Teradata Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Installing Required Teradata Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Setting Up the Environment for Using Export Operator . . . . . . . . . . . . . . . . . . . . . . . . . 23 Loading Teradata Data Using Teradata Parallel Transporter . . . . . . . . . . . . . . . . . . . . . . 24 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
iv
Contents
1
In This Chapter
Understanding Essbase SQL Interface ............................................................................................ 5 Preparing for Using SQL or Relational Data Sources ............................................................................ 6
Use this chapter to learn about Essbase SQL Interface and prepare for loading data with it.
You do not need Essbase SQL Interface for spreadsheet or text file data sources which you can load using Oracle's Essbase Administration Services, MaxL, or ESSCMD. See the Hyperion Essbase - System 9 Database Administrator's Guide and the Essbase Technical Reference. Essbase SQL Interface works with Administration Services to retrieve data, as follows: 1. Using Administration Services you write a SELECT statement in SQL . 2. Essbase SQL Interface passes it to the SQL or relational database server. For non-SQL data sources, Essbase SQL Interface converts SQL statements to requests for data that the source understands. 3. Essbase SQL Interface interprets the records received from the SQL, or relational database server using the rules defined in the data load rules file. (For more information on data load rules files, see Chapter 4, Loading SQL Data.) 4. Essbase SQL Interface loads the interpreted, summary-level data into the database.
Create one table or view in the SQL database before using Essbase SQL Interface. Join the tables during the data load by entering a SELECT statement in Administration Services. See Understanding Multiple-Table Preparation on page 9 for instructions.
3 Check the data source connection by using Data Prep Editor in Administration Services Console to open the
SQL source file. See Chapter 4, Loading SQL Data.
4 Create a rules file to tell Essbase SQL Interface how to interpret the SQL data to be used with the Essbase
database. See Chapter 4, Loading SQL Data.
After these steps are complete, you can load data or build dimensions. See Chapter 4, Loading SQL Data for instructions.
2
In This Chapter
Configuring a Data Source on Windows .......................................................................................... 7 Configuring a Data Source on UNIX ............................................................................................... 7
Before you can access data using Essbase SQL Interface, you must configure the operating system for each data source and the driver it requires. Essbase installation provides DataDirect ODBC drivers. This chapter describes procedures for configuring Windows and UNIX. For information about configuring non-DataDirect ODBC drivers, see Chapter 5, Using Non-DataDirect ODBC Drivers . For a complete list of supported ODBC drivers, see Hyperion Essbase - System 9 Installation Guide.
Note:
For detailed, driver-specific information on each of the DataDirect drivers, see the DataDirect Connect for ODBC Reference. The location of this reference varies depending on the platform. Typically it is within the \$HYPERION_HOME\common\ ... \books\odbc\odbcref\ directory.
2 Choose a data source, or add one, and then enter the required information about the driver.
For detailed instructions, see the documentation from the ODBC provider.
2 Edit the odbc.ini file to add a description of the data source. See Editing the odbc.ini File for Changes
on page 8 and Example: Editing odbc.ini for DB2 on page 8.
3
In This Chapter
Understanding Multiple-Table Preparation ....................................................................................... 9 Preparing Data from Multiple Tables .............................................................................................11
This chapter describes how to prepare relational data in multiple tables for loading into Essbase.
Understanding Two Methods for Multiple-Table Data Preparation on page 9 Understanding Security Requirements on page 11 Choosing a Preparation Method on page 11
Creating one table or view in the SQL database before using Essbase SQL Interface:
Joining the tables by entering a SELECT statement in Administration Services Console during the data load-dimension build task:
10
(For either preparation method) SELECT access privileges to all tables containing the relevant data. (For creating a single table or view in the relational database source) CREATE access privileges in the SQL database to create a single table or view. Ask the SQL Database Administrator for the appropriate CREATE privileges.
If you cannot obtain CREATE privileges, use Administration Services to join tables during the data load.
SELECT access to tables where relevant data is stored CREATE access to create a single table or view to join multiple-table data before using Essbase SQL Interface
Create a single physical table or virtual table (view) based on data from multiple tables in the source database. Create a SELECT statement in Administration Services Console that joins the tables: Identify the tables and columns (or fields) containing the data that you want to load into Essbase. Select File > Open SQL in Administration Services Console to display Open SQL Data Sources. See Opening an SQL Database in Essbase Administration Services Online Help. Write a SELECT statement that joins the tables. See Selecting the SQL Data Source on page 15 and Creating SQL Queries (optional) on page 15.
Note:
a. b. c.
Essbase passes the SELECT statement to the database without verifying the syntax.
11
12
4
In This Chapter
Understanding Data Loading .....................................................................................................13 Using Substitution Variables ......................................................................................................13 Loading Relational Data Using Essbase SQL Interface .........................................................................14 Loading the Data...................................................................................................................16
This chapter describes how to use Oracle's Essbase Administration Services to load data and build dimensions from SQL data sources.
2 Create a rules file. See Loading Relational Data Using Essbase SQL Interface on page 14. 3 Load data into the Essbase database. See Loading the Data on page 16.
13
The value of the substitution variable should be valid and appropriate SQL. Essbase does not validate the value. Be especially careful when you use quotation marks or single quotes. Different source databases have different conventions about when to use them. Whether or not you use a substitution variable, be sure that no regular SQL operators in SELECT, FROM, or WHERE clauses start with the ampersand (&), because that is the Essbase identifier for substitution variables.
2 To open the SQL data source when you edit the rules file select File > Open SQL from the menu. (See
Creating a Rules File in Essbase Administration Services Online Help.) Specify substitution variables in the resulting Open SQL Data Sources dialog box.
To specify a substitution variable for the DSN, select Substitution Variables and select the substitution variable from the list. To specify substitution variables in the query, use the substitution variable instead of a field=value string in the Select, From, or Where box. Remember to type the ampersand (&) in front of the substitution variable name.
Be sure to set the desired value for the substitution variables before you use the rules file for a data load or dimension build.
Summary of Steps
1. Create a data load rules file.
14
2. Select your SQL data source. See Selecting the SQL Data Source on page 15 for instructions. 3. If you plan to create SQL queries in Essbase, see Creating SQL Queries (optional) on page 15.
5 Click OK/Retrieve. 6 In SQL Connect, enter the user name and password for the source database and click OK.
Note the following facts about data source files:
The data source file must be configured on the server computer. On UNIX platforms, you have defined the path for the SQL data source file in the .odbc.ini file. On Windows, if you have not defined the path for the SQL source file in the ODBC Administrator, you can type the path in the Database text box of the Define SQL dialog box. If you do not define a path, Essbase looks for the data source file in the directory from which you are running Essbase Server.
Creating a SELECT statement in Essbase is usually slower than creating a table or view in the source database.
15
The SQL Statement text box in the Open SQL Data Sources dialog box has Select, From, and Where text boxes to help you write SQL queries. You can specify multiple data sources, filter the display of records, and specify the desired order and grouping of records that will appear in Data Prep Editor.
16
5
In This Chapter
Configuring a Non-DataDirect Driver .............................................................................................17 Creating a Configuration File for Non-DataDirect Drivers.......................................................................18 Configuring Non-DataDirect Data Sources ......................................................................................21 Support for Non-DataDirect Drivers ..............................................................................................21
You can use drivers other than the DataDirect drivers provided with Essbase. Some nonDataDirect ODBC drivers are tested with Essbase. For detailed information on tested and supported drivers and data sources, see the Hyperion Essbase - System 9 Installation Guide.
If you do not create a configuration file, Essbase uses the default values. You may not be able to connect to the SQL database using the default values.
17
Including the Minimum Required Contents on page 18 Finding a Driver Name on Windows on page 20 Finding a Driver Name on UNIX on page 20
"Description of Driver " DriverName Value Value Value Value Value Value Value Value
Value
Description of Driver is your description of the driver. Enclose the description in quotation marks (" "). The default value is " ".
18
Using Non-DataDirect ODBC Drivers
DriverName is the file name of the non-DataDirect ODBC driver and is required. For all other configuration keywords, set Value to be either 1 or 0, according to the following table:
Configuration Information UserId Value 1 0 Password 1 0 Database 1 0 Server 1 0 Application 1 0 Dictionary 1 0 Files 1 0 SingleConnection 1 Description User ID required User ID not required Default: 0 Password required Password not required Default: 0 Database name required Database name not required Default: 0 Server name required Server name not required Default: 0 Application name required Application name not required Default: 0 Dictionary name required Dictionary name not required Default: 0 Files name required Files name not required Default: 0 Driver not thread-safe One active connection allowed Default: 1 Recommendation for DataDirect drivers: 1 0 Driver thread-safe Multiple active connections allowed Caution! Specifying 0 (multiple active connections allowed) for DataDirect or non-DataDirect drivers may lead to instability UpperCaseConnection 1 0 IsQEDriver 1 Driver not case-sensitive Connection information is converted to uppercase Driver case-sensitive Connection information is unchanged Default: 0 Driver is a DataDirect driver You can specify configuration information for DataDirect drivers (for example, if you have a later version of a DataDirect driver which Essbase does not yet support) Driver is a non-DataDirect driver Default: 0
The defaults apply if you do not specify the value for the driver. These defaults are different from the Essbase default values that apply if you do not create an esssql.cfg file. Include configuration information for all the non-DataDirect drivers in one configuration file. Enclose the values for each driver in brackets ( [ ] ).
Creating a Configuration File for Non-DataDirect Drivers
19
DriverName
DriverName
The ODBC Data Source Administrator dialog box appears. Data sources that you have configured are in the User Data Sources list box. Drivers that have not been properly configured may also appear in the User Data Sources list box. Ignore them.
2 Select the Drivers tab. 3 Obtain the file name of the driver by scrolling to the right. For example, the file name for the Microsoft Access
Driver is ODBCJT32.DLL.
20
Before you configure a non-DataDirect data source, you must first configure the driver by creating an esssql.cfg configuration file. See Creating a Configuration File for NonDataDirect Drivers on page 18.
21
22
A
In This Appendix
Installing Required Teradata Software ...........................................................................................23 Setting Up the Environment for Using Export Operator .........................................................................23 Loading Teradata Data Using Teradata Parallel Transporter ...................................................................24
You can use Teradata Parallel Transporter from Teradata Tools and Utilities to significantly improve data load performance. With this method, ODBC is used to extract the database schema; then Teradata Parallel Transporter retrieves the data. This method is tested for Teradata Parallel Transporter Export Operator release 8.2 and Teradata 3.6 ODBC and is supported for the following platforms: 32-bit and 64-bit AIX, 32-bit HP-UX, Red Hat Linux, 32-bit and 64-bit Solaris, 32-bit Windows, and 64-bit Windows Intel and AMD.
From Teradata Tools and Utilities install Teradata Parallel Transporter Export Operator, Shared ICU Libraries for Teradata, Teradata GSS Client, and CLI. (For Linux installations, select libraries built by GCC 3.3.) Install the Teradata ODBC driver.
Add an entry to the hosts file for the Teradata database; for example:
172.27.24.181 tera2db tera2cop1
Configure a system ODBC DSN for $TELAPI$<tera> where <tera> is the name of the Teradata data source: for example:
DSN = $TELAPI$tera2db
23
For UNIX operating systems, ensure needed environment variable paths are defined in the appropriate location. (The Windows installation automatically updates needed environment variables):
TD ODBC driver CLIv2 TD GSS Shared ICU TPT export operator files DataDirect ODBC driver
In addition, in the appropriate path for the operating system, set the following variables for Teradata Parallel Transporter. (For details, see the Code Samples appendix in Teradata Parallel Transporter Application Programming Interface Programmer Guide); for example, for Solaris SPARC:
(If CLI is not installed in the default directory) export COPERR = <directory location of errmsg.cat >
export COPERR = /usr/lib
24
Index
A
Administration Services Console joining tables, 10 loading SQL data, 13 SELECT statement, 10, 11 ARBORPATH, 17
B
BIN directory, 17 building Essbase dimensions, 5
C
cfg (.CFG) file, creating, 17 choosing, a driver, 7 configuration file, for non-MERANT drivers, 18 configuring data sources non-MERANT, 21 overview, 7 non-MERANT drivers, 17, 19 converting SQL statements, 5 CREATE privileges, 11 creating data load rules file, 14 driver configuration file, 17, 18, 19 security privileges for single table or view, 11 single table or view, 9, 11
D
data load preparation, 9 load preparation methods, 11 SQL, mapping, 14 data load rules file creating, 14 definition, 14
SQL records, 5 data sources non-MERANT, 21 paths, 15 selecting, 15 DB2, example odbc.ini file, 8 dialog boxes Define SQL, 11 ODBC Data Source Administrator, 20 dimensions, building, 5 directories BIN, 17 data sources, default, 15 driver configuration file, 17 driver configuration file creating, 17, 18, 19 default values, 17, 19 in BIN directory, 17 keyword values, 19 required values, 18 syntax, non-MERANT drivers, 19 drivers choosing in ODBC Administrator, 7 description of, 18 file names, 20 naming, 18 non-DataDirect, 17 non-MERANT, 21 password, 17 UNIX, names, 20
E
Essbase default values for drivers, 17, 19 loading data into, 13 outline, mapping data to, 14 esssql.cfg, 17, 18, 19
Index
25
F
files, .CFG (configuration), 17
O I
installed ODBC drivers, listed, 20 interpreting SQL records, 5 ODBC Administrator, 7 ODBC drivers file names, 20 non-DataDirect, 17 tested, 17 UNIX, names, 20 odbc.ini file DB2 example, 8 ODBCJT32.DLL, 20 outline loading data, 16
J
joining tables, 10 Administration Services:Administration Services, 10 SELECT statement, 11
K
keywords, driver configuration file, 19
P
passing SELECT statements, 11 SQL statements, 5 passwords for driver, 17 paths esssql.cfg, 17 for data sources, 15 processing time, 11
L
loading data data load rules, 14 from single table, 9 into outline, 16 joining tables, 10, 11 overview, 6, 13 preparing for, 9 summary level data, 5 using Administration Services, 13
R
relational data, loading:, 5. See also data requesting non-SQL data, 5
M
mapping SQL data to an Essbase outline, 14 Microsoft Access, ODBC driver for, 20 multidimensional databases building Essbase dimensions, 5 loading data into, 5 multiple tables joining, 10, 11 loading from, 9 preparing, 9
S
security privileges, 11 SELECT statement, 11 joining tables, 10 processing time, 11 selecting SQL data sources, 15 spreadsheet data sources, 5 SQL data joining tables, 10 loading, 5 mapping, 14 selecting source, 15 SQL databases single tables in, 9
N
non-DataDirect drivers configuring, 17
26
Index
SQL databases, single tables in, 11 SQL queries, 15 SQL server, 11 SQL statements, 5 summary data, loading, 5
T
tables creating, 9 efficiency, 11 joining, 10, 11 loading from, 9 SQL databases, 9 Teradata data source, using Teradata Export Operator, 23 tested drivers, 17 non-MERANT drivers, 21 text file data sources, 5
U
UNIX environments, odbc.ini file, 20
V
views, 11 creating, 9 SQL databases, 9
W
Windows 2000/XP environments, configuring data sources, 7
Index
27
28
Index