Oracle® OLAP DML Reference 10g Release 2 (10.2) Part Number B14346-01 |
|
|
View PDF |
You can use the OLAP DML, itself, to create analytic workspaces and analytic workspace objects. When you use the OLAP DML to create new workspaces and objects, you create only the definitions needed for OLAP DML statements to execute successfully. You do not create the views and metadata the OLAP tools need to execute.
Important: When you use the OLAP DML to create new workspaces and objects, you create only the definitions needed by the OLAP DML. You do not create the views and metadata the Oracle OLAP tools need to execute. For information on creating workspaces that can be used by the OLAP tools, see Oracle OLAP Application Developer's Guide |
This section provides overview information about the OLAP DML statements that you use to:
Define new analytic workspaces
Define analytic workspace objects
To create a new analytic workspace, issue an AW command with the CREATE keyword, followed by an UPDATE statement and a COMMIT statement.
An analytic workspace contains two types of objects:
Data objects that contain the data that you want to analyze and the results of the analysis.
Calculation specifications that contain OLAP DML statements that specify the analysis that you want performed.
Table A-20, "Workspace Object Data Definition Statements" lists the OLAP DML statements that you use to create basic definitions of analytic workspace objects and to change and view analytic workspace object definitions. Table A-21, "OLAP DML Statements for Extending Object Definitions" lists the OLAP DML statements that you use to extend the basic definitions. For more specific information, see "Creating Data Objects Using the OLAP DML" and "Creating Calculation Specifications".
Data objects contain the data that you want to analyze and the results of the analysis.
Table 1-2, "OLAP Data Object Definition Statements" briefly describes the data objects that you can define in an analytic workspace and the OLAP DML statements that you use to define these objects.
Table 1-2 OLAP Data Object Definition Statements
Object Name | Description | DEFINE command |
---|---|---|
Variable |
An array of values that you want to analyze or an array of values that are the result of the analysis. |
|
Dimension |
A dimension or index to one or more variables or relations, or provide a list of values to an OLAP DML program. Typically, the dimensions of variables are detailed, multilevel hierarchical dimensions. |
|
Dimension surrogate |
An alternative set of values for a dimension. You can use a surrogate rather than a dimension in a model, in a LIMIT command, in a qualified data reference, or in data loading. |
|
Composite |
A list of dimension value combinations that you use to dimension a variable when you do not want the variable to have empty cells. |
|
Relation |
A multidimensional array whose values specify correspondence between the values of one or more dimensions. For example, a parent relation for a hierarchical dimension describes the child-parent relationship of the values within the dimension. |
|
Valueset |
A list of dimension values for one or more dimensions. Frequently, you use valuesets to limit calculation to those variable values that are identified by the valueset. |
|
Frequently you populate the base values of your data objects from relational tables or from flat files as discussed in "Data Loading Programs". You then calculate other values from these base values of the base objects using calculation specifications as described in "Creating Calculation Specifications". You can also assign values to variables, relations, and dimension surrogates using assignment statements (see SET and SET1); add values to dimensions using MAINTAIN statements; and specify values for valuesets using the LIMIT command.
Calculation specifications are OLAP DML objects that contain OLAP DML statements that specify analysis that you want performed.
Using the OLAP DML you can define objects that are specifications for different types of OLAP calculation:
Formulas—A formula is a saved expression.
Aggregations—An aggregation is a specification for how data should be aggregated.
Allocations—An allocation is a specification for how data should be allocated down a hierarchy.
Models—A model is a set of interrelated equations. The calculations in an equation can be based either on variables or on dimension values. You can assign the results of the calculations directly to a variable or you can specify a dimension value for which data is being calculated.
Programs—An OLAP DML program is a collection of OLAP DML statements that helps you accomplish some workspace management or analysis task. You can use OLAP DML programs as user-defined commands and functions.
The general process of creating a calculation specification object is the following two step process:
Define the calculation object using the appropriate DEFINE statement.
Add the calculation specification to the object definition. You can add the calculation specification to the definition of a calculation object in the following ways:
At the command line level of the OLAP Worksheet, in an input file, or as an argument to a PL/SQL function. In this case, ensure that the object is the current object (issue a CONSIDER statement, if necessary), and, then, issue the appropriate statement that includes the specification as a multiline text argument. To code the specification as a multiline text, you can use a JOINLINES function where each of the text arguments of JOINLINES is a statement that specifies the desired processing, and where the final statement is END
.
In an Edit Window of the OLAP Worksheet. In this case, at the command line level of the OLAP Worksheet, issue an EDIT statement with the appropriate keyword. This opens an Edit Window for the specified object. You can then type each statement as an individual line in the Edit Window. Saving the specification and closing the Edit Window when you are finished.
Table 1-3 outlines the OLAP DML statements that you use to create each type of calculation specification.