Oracle® OLAP DML Reference 11g Release 2 (11.2) Part Number E17122-07 |
|
|
PDF · Mobi · ePub |
The DESCRIBE command produces a report that shows the definition of one or more workspace objects. An object definition that you see in the output from a DESCRIBE command might include a description (LD), a value name format (VNF) for a time dimension, an expression associated with a FORMULA, permission specified a PERMIT statements, or the contents of a calculation specification (for example, the contents of a program). You can use DESCRIBE to show the definition of an object even when you do not have permission to access the object or to change its permission. Some parts of some object definitions are not reported on as described in "What's Not in the Report Output by DESCRIBE".
DESCRIBE [names]
The names of one or more workspace objects, separated by spaces or commas. When you omit this argument, DESCRIBE shows the definition of all objects in the current status of the NAME dimension. Consequently, when you omit this argument you can use a LIMIT command in combination with DESCRIBE to report the definitions of a particular group of objects in your workspace, as illustrated in Example 9-109, "Describing All Relations".
What's Not in the Report Output by DESCRIBE
Some parts of the object definitions do not appear in the output of DESCRIBE:
When a PERMIT statement denies you the right to change the permission of an object, DESCRIBE does not include the permission associated with the definition of the object.
For a worksheet definition, the DESCRIBE report does not include the default dimensions, WKSCOL
and WKSROW
. However, it does include user-defined dimensions when they have been used to define a worksheet. See Example 9-110, "Describing a Worksheet".
Properties and triggers associated with objects are not displayed. To see the properties and triggers associated with an object, you must use the FULLDSC program.
When you define a composite or conjoint has the default index type, that information is not displayed.
Dimensioned BOOLEAN variables that are in older 1 or 2 byte formats are listed as WIDTH 1 and WIDTH 2. The width of BOOLEAN variables created in single-bit format is not listed.
Creating Objects with DESCRIBE Output
You can use the output from the DESCRIBE command to create objects in other workspaces, because each line of the output is a valid statement. For example, you can execute an OUTFILE statement to send subsequent output to a file, and then execute a DESCRIBE command. You can then access another workspace and use an INFILE statement to read the DESCRIBE output. The same object is created in that workspace.
Example 9-108 Describing Variables
This example produces a report of the definitions of the two variables, sales
and price
. The statement
DESCRIBE sales price
produces the following output.
DEFINE SALES VARIABLE DECIMAL <MONTH PRODUCT DISTRICT> LD Sales Revenue DEFINE PRICE VARIABLE DECIMAL <MONTH PRODUCT> LD Wholesale Unit Selling Price
Example 9-109 Describing All Relations
Suppose you want to look at the definitions of all the relations in your workspace. First limit the NAME dimension, using the OBJ function. After limiting NAME, use DESCRIBE with no arguments to produce a report of the definitions. The following statements produce a description of the relations in the analytic workspace.
LIMIT NAME TO OBJ(TYPE) EQ 'RELATION' DESCRIBE
DEFINE REGION.DISTRICT RELATION REGION <DISTRICT> LD REGION for each DISTRICT DEFINE DIVISION.PRODUCT RELATION DIVISION <PRODUCT> LD DIVISION for each PRODUCT DEFINE MLV.MARKET RELATION MARKETLEVEL <MARKET> DEFINE MARKET.MARKET RELATION MARKET <MARKET> LD Self-relation for the Market Dimension
Since the values returned by OBJ(TYPE) are always in uppercase, you have to use 'RELATION' rather than 'relation' in your LIMIT command to obtain a match.
Example 9-110 Describing a Worksheet
The dimensions of a worksheet appear in the description only when they are user-defined dimensions. The default dimensions WKSCOL
and WKSROW
are not included in the description. The statements
DEFINE work1 WORKSHEET DEFINE columns DIMENSION INTEGER DEFINE rows DIMENSION INTEGER DEFINE work2 WORKSHEET <columns rows> DESCRIBE work1 work2
produce the following output.
DEFINE WORK1 WORKSHEET DEFINE WORK2 WORKSHEET <COLUMNS ROWS>