Essbase DATAEXPORT(转)

DATAEXPORT

Writes data to a text file, binary file, or as direct input to a relational file using ODBC.

Syntax

For a text output file:
DATAEXPORT "File" "delimiter"fileName"missingChar"

For a binary output file:
DATAEXPORT "Binfile" "fileName"

For direct export to a relational database using ODBC:
DATAEXPORT "DSN" "dsnName" "tableName" "userName" "password"

"File"

"Binfile"

"DSN"

Required keyword for the type of output file. Specify the appropriate keyword, then use the associated syntax.

"delimiter"

Required for "File" exports

The character that separates fields; for example, ","

Do not use with "Binfile" or "DSN" exports

"fileName"

Required for "File" and "Binfile" exports

Full path name for the export file.

Do not use with "DSN" exports.

"missingChar"

Optional for output type "File"

  • A text string to represent missing data values. Maximum length: 128 characters.
  • "NULL" to skip the field, resulting in consecutive delimiters (such as ,,).
  • Default value: #MI

Do not use with "Binfile" or "DSN" exports, or in combination with the SET DATAEXPORTRELATIONALFILE command.

"dsnName"

Required for output type "DSN"

The DSN name used to communicate with the SQL database. A substitution variable can be used.

 

Do not use with output type "File" or "Binfile".

"tableName"

Required for "DSN" exports

The table name where the exported data is to be inserted.

 

Do not use with "File" or "Binfile" exports.

"userName"

Required for "DSN" exports

The user name that is used when communicating with the database. A substitution variable can be used.

 

Do not use with "File" or "Binfile" exports

"password"

Required for "DSN" exports

The password that is used when communicating with the database. A substitution variable can be used.

 

Do not use with "File" or "Binfile" exports

Description

The DATAEXPORT calculation command writes data into a text or binary output file, or connects directly to an existing relational database wherein the selected exported data is inserted.

Whereas both the MaxL export data statement and the ESSCMD EXPORT command can export all, level 0, or input data from the entire database as text data, the DATAEXPORT calculation command also enables you to:

  • Use FIX…ENDFIX or EXCLUDE…ENDEXCLUDE calculations to select a slice of the database and use a DATAEXPORTCOND command to select data based on data values.
  • Use parameters to qualify the type and destination of the export data.
  • Use options provided by the SET DATAEXPORTOPTIONS command to refine export content, format, or process.
  • Use the SET DATAIMPORTIGNORETIMESTAMP command to manage the import requirement for a matching outline timestamp.
  • Use the DEXPSQLROWSIZE configuration setting to specify the number of rows to be collected in batches for insertion to an SQL database using DATAXPORT "DSN".

Using Report Writer to create an "export" file also provides extensive flexibility in selecting and formatting the data; however, using DATAEXPORT outputs the data more quickly. For information about using Report Writer to export data, see the Hyperion Essbase - System 9 Database Administrator's Guide.

Notes

  • In general, specify SET commands within the calculation script to specify various options, and then use FIX…ENDFIX to refine data to be exported, including the DATAEXPORT command within the FIX…ENDFIX command set. Without FIX…ENDFIX, the entire database is exported.
  • Some file management systems do not support text files larger than 2 GB. If the exported data exceeds 2 GB, Essbase creates multiple export files, as needed. An underscore and number is appended to the file names of the additional files, starting with _1. For example, if fileName is outfile.txt and three files are created, the resulting file names are outfile.txt, outfile_1.txt, and outfile_2.txt.
  • If outputting a file, and:
    • If fileName does not include a path, the file is written in the application directory.
    • If fileName includes a path, Essbase interprets the path in context to the server. Export files cannot be written to a client.
  • The export process does not begin if users are logged into the database. After the export process begins, the database is in read-only mode. Users can read the data but they cannot change it. After the export process is finished, Essbase returns the database to read-write mode and users can make changes to the data.
  • Use the DATAIMPORTBIN command to import a previously exported binary export file.

Examples

Text Output File Examples

Example 1
SET DATAEXPORTOPTIONS 
  { 
  DataExportLevel "LEVEL0"; 
  };
DATAEXPORTCOND ("Sales">=1000);
FIX ("100-10","New York","Actual","Sales");
DATAEXPORT "File" "," "b:\exports\jan.txt" "#MI";
ENDFIX;

Specifies a level 0 data export level, limits output to data only with 1000 or greater Sales, fixes the data slice, then exports to a text file located at b:\exports\jan.txt, using comma (,) delimiters and specifying #MI for missing data values.

Example 2
SET DATAEXPORTOPTIONS 
  { 
  DataExportLevel "LEVEL0";
  DataExportRelationalFile ON; 
  };
DATAEXPORTCOND ("Sales">=1000);
FIX ("100-10","New York","Actual","Sales");
DATAEXPORT "File" "," "b:\exports\jan.txt";
ENDFIX;
Specifies the same export content as Example 1. However, the output file is formatted for input to a relational database. Notice the  missingChar parameter is intentionally excluded.

Binary Examples

Export
SET DATAEXPORTOPTIONS 
  { 
  DataExportLevel "ALL";
  };
FIX ("New York");
DATAEXPORT "BinFile" "b:\backup\newyork.bin";
ENDFIX;

Exports all New York blocks. Binary exports can be fixed only on sparse dimensions. Essbase uses the same bitmap compression technique to create the file as is used by Essbase Kernel.

Import
SET DATAIMPORTIGNORETIMESTAMP OFF;
DATAIMPORTBIN "b:\backup\newyork.bin"
Imports the previously exported file. The timestamp must match. The data is imported to the database on which the calculation script is executed. Because only data was exported, to recreate a database, after using DATAIMPORT to read in the data, you must recalculate the data.

Direct Input to Relational Database Example

SET DATAEXPORTOPTIONS 
  { 
  DataExportLevel "ALL"; 
  };
Table of Contents Preface Chapter 1: Understanding and Modifying Data Sources Chapter 2: Using Essbase Studio Chapter 3: Building the BSO Cube Chapter 4: Building the ASO Cube Chapter 5: Using EAS for Development Chapter 6: Creating Calculation Scripts Chapter 7: Using MaxL to Automate Process Chapter 8: Data Integration Chapter 9: Provisioning Security Using MaxL Editor or Shared Services Chapter 10: Developing Dynamic Reports Index Preface Up Chapter 1: Understanding and Modifying Data Sources Introduction Setting up an Account or Measures dimension with a parent-child reference Setting up dimensions with a generation reference Adding columns for outline formulas Adding the solve order column to tables that have ASO formulas Adding and populating the Sort Order Column Adding tables for varying attributes Determining hierarchies in relational tables Using the Essbase Outline Extractor to extract dimensions Using Star Analytics to build your star schema from existing Essbase cubes Up Chapter 2: Using Essbase Studio Introduction Creating TBC sample database and connecting to the data source Adding user-defined tables Building your minischema Setting up joins in a minischema Adding tables to a minischema Using a text file data source Working with Common Platform Language (CPL) Using Sort Order on data elements Up Chapter 3: Building the BSO Cube Introduction Creating hierarchies using a parent-child reference table Creating hierarchies using a generation reference table Adding attribute dimensions to hierarchies Building a Calendar dimension Creating date elements Creating Alias tables Developing cube schema and an Essbase model Setting Essbase properties Deploying a cube Creating an OLAP Model in EIS Creating an OLAP metaoutline in EIS Up Chapter 4: Building the ASO Cube Introduction Using the Connection Wizard to set up an ASO cube Building a Measures dimension from the fact table Creating an ASO Cube Schema and an Essbase Model Understanding Essbase Model properties for the ASO cube Designing a drill-through report Using the View dimension for Dynamic Time Series reporting Up Chapter 5: Using EAS for Development Introduction Adding an application and database on an Essbase Server Using the outline editor to add dimensions Using dimension build rules to add the parent-child dimension Creating dimension build rules to add a base and attribute dimensions Using dimension build rules to add user-defined attributes and associate dimensions Creating load rules for flat file data loads Creating substitution variables Using If/Else logic and substitution variables in outline formulas Using Text measures on a BSO cube Using Date measures on a BSO cube Using different outline formula logic at parent level Creating a load rule for SQL data load using substitution variables Using MDX in aggregate storage applications Up Chapter 6: Creating Calculation Scripts Introduction Using Essbase Set function commands and Calc All to calculate cubes Using control flow commands, conditional, and logical operators Using substitution variables in calculations script Using UDAs and Calc Two Pass in calculation scripts Using Attributes in calculation scripts Clearing data and using the cross- dimensional operators in a calculation script Using allocation functions in calculation scripts Modifying Essbase settings to improve calculation performance Using MDX to calculate Aggregate Storage database Up Chapter 7: Using MaxL to Automate Process Introduction Setting up folder structure and other files needed for MaxL automation Executing dimension build rules using MaxL Executing load rules using MaxL Executing calculations using MaxL Executing partitions using MaxL Executing report scripts using MaxL Adding or changing substitution variables with MaxL Using ASO incremental data loads Using encryption in MaxL scripts Deploy dimension created in Essbase Studio Up Chapter 8: Data Integration Introduction Using report script to extract data to a text file Using the DATAEXPORT function to extract data into a text file Using the DATAEXPORT function to extract data into a relational source Exporting data using column format Using MaxL to extract the outline in XML format Using @XREF functions to move data between BSO cubes Partitioning data from BSO to ASO cubes Using MDX for extracting data using API There's more Up Chapter 9: Provisioning Security Using MaxL Editor or Shared Services Introduction Using MaxL editor to add and externalize a user Using Shared Services to add and provision a user Using MaxL Editor to set up a filter for MetaRead and Write access Using Shared Services to provision filters to a group Using Shared Services to provision calculation scripts to a group Using MaxL to export security file Up Chapter 10: Developing Dynamic Reports Introduction Creating a connection and using substitution variables in financial reports Using the column templates and formatting reports Retrieving data using UDAs and Attributes Retrieving data using children and descendants member set functions Using User Prompts and the POV to select members Using conditional formatting and suppression in financial reports Adding related content to financial reports Creating a web analysis report http://www.packtpub.com/oracle-essbase-11-development-cookbook/book
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值