|Oracle® OLAP Java API Developer's Guide
11g Release 2 (11.2)
|PDF · Mobi · ePub|
This preface describes the features of the Oracle OLAP Java API that are new in the 11g releases of Oracle OLAP.
This topic describes the features of the Oracle OLAP Java API that Oracle has added since the initial 11g Release 1 (11.1). For a complete list of the packages, classes, fields, and methods that are new since 11.1, see the Overview of Oracle OLAP Java API Reference.
The following topics describe the new features since 11.1.
To support legacy 10g metadata objects, the Oracle OLAP Java API includes the following functionality.
Allowing 10g and 11g metadata objects in the same session. The
oracle.olapi.data.source.DataProvider class has the new
ALL metadata reader mode setting. For more information, see "Describing Namespaces".
Attributing namespaces. To allow a 10g metadata object to exist in the same session as 11g objects, Oracle OLAP assigns a namespace to the 10g object. The namespace identifies the metadata format and the type of object. For more information on namespaces, see "Describing Namespaces".
In 11.2, you can use the
setName method to rename a persistent 11g metadata object. In previous releases, you could use the
MdmObject.setName method only once to specify a name for a persistent metadata object. You could not change the name after setting it. For more information on setting names, see "Getting and Setting Names".
In a column for an attribute in an OLAP view, you can now automatically populate the rows for lower levels in a dimension hierarchy with the attribute values that are mapped at a higher level. For more information, see "Populating OLAP Views with Hierarchical Attribute Values".
The following new features affect materialized views for OLAP cubes.
Specifying attribute column names for materialized views. With the
setETAttrPrefix method of the
MdmDimensionality object for a dimension of an OLAP cube, you can specify the prefix that Oracle OLAP uses in naming the columns for the attributes of the dimension in the materialized view for the cube. For more information, see "Preparing Attributes for Materialized Views".
Including populated lineage attributes in a materialized view that is available to the query rewrite system. If the materialized view has a column for the same attribute at different levels of a hierarchy, you can specify the new
REWRITE_WITH_ATTRIBUTES_MV_OPTION materialized view option of the
AWCubeOrganization class. That option populates the column for an attribute for a level in the view with the values of the same attribute for lower levels. For more information, see "Representing Cubes".
The following topics describe new features that affect building analytic workspace metadata objects.
You can now create an
oracle.olapi.syntax.LoadCommand that specifies the use of serial or parallel processing when loading data in an analytic workspace. The
LoadCommand also has a
PRUNE option, which specifies that the build spawns jobs only for the partitions for which measure data exists.
LoadCommand class now has constructor methods as well as static constant fields that produce
LoadCommand objects. One of the constructors takes the name of a
CubeMap. With that constructor, you can specify loading data from single
CubeMap rather than from all
SolveCommand classes also have serial and parallel processing options.
oracle.olapi.data.source.BuildResult, an application can get the identification number for a build process. The
DataProvider class has
executeBuild methods that take a
An analytic workspace automatically generates the identification number during a build. You can use the build number to track the progress of a build.
oracle.olapi.syntax.AggregationFunctionExpression class, in an
MdmModel you can aggregate measure values over specified dimension members. You specify the dimension members with an
AggregateOverMembersClause. You can use an
AggregationFunctionExpression as the
Expression for an
MdmCustomMember or the member expression of an
MdmAssignment in the
You can now specify a language when mapping an attribute and you can map multiple languages to the same attribute. For more information, see "Specifying a Language for an Attribute" and "Specifying Multilingual Attributes".
The following new features allow you to add identifying metadata to objects.
Classifying objects. With the
addObjectClassification method of an
MdmObject, you can add metadata to that object. For more information, see "Using Classifications".
Grouping attributes. With the
setAttributeGroupName method of an
MdmBaseAttribute, you can specify a name for an attribute group. For more information, see "Grouping Attributes".
An implementation of the
oracle.olapi.metadata.XMLWriterCallback interface provides Oracle OLAP the means to call back to an application while the
MdmMetadataProvider is exporting the XML definition of an object. With an
XMLWriterCallback, the application can specify whether or not to exclude an attribute or an owner name from the exported XML. For more information see "Exporting and Importing Metadata as XML Templates".
Some aspects of the Oracle OLAP Java API are much the same as in previous releases, such as the ability to create queries with classes in the
oracle.olapi.data.source package and to retrieve the data with classes in the
oracle.olapi.data.cursor package. However, in Oracle OLAP 11g Release 1 (11.1) the metadata model of the API has changed and has many new features. The major new features are presented in the following topics.
The Oracle OLAP Java API now has the ability to create and maintain persistent metadata objects. The Oracle Database stores the metadata objects in the Oracle data dictionary.
To provide this new functionality, the Oracle OLAP Java API substantially revises the metadata model. The new model includes several new packages and has significant changes to some existing packages. For example, the
oracle.olapi.metadata.mdm package has many new classes. It also has many new methods added to existing classes. For information on OLAP metadata objects, see Chapter 2, "Understanding OLAP Java API Metadata".
Some classes and methods are deprecated in the new model. For example, all of the classes in the
oracle.olapi.metadata.mtm package are deprecated, and methods of other classes that use the
mtm classes are also deprecated. Some
mtm classes mapped transient
mdm objects to relational database structures, such as columns in tables and views. Other
mtm classes specified how Oracle OLAP performed operations such as aggregation or allocation of the values of custom measures. That functionality is replaced by classes in the
mdm, and the
oracle.olapi.syntax package. With the new classes, an application can create permanent metadata objects, map them to data sources, and specify the operations that provide values for measures.
When an application commits the
Transaction in which it has created top-level objects in the OLAP metadata model, such as instances of classes like
MdmPrimaryDimension, those objects then exist in the Oracle data dictionary. They are available for use by ordinary SQL queries as well as for use by applications that use the Oracle OLAP Java API.
Because the metadata objects exist in the Oracle data dictionary, an Oracle Database DBA can restrict access to certain types of the metadata objects. A client application can set such restrictions by using the JDBC API to send standard SQL
REVOKE commands through the JDBC connection for the user session.
An application can now define, build, and maintain analytic workspaces. This new functionality is provided by classes in the
mdm, and the
oracle.olapi.syntax package. In 10g releases of Oracle Database, that functionality was provided by a separate API, the Oracle OLAP Analytic Workspace Java API, which is entirely deprecated in this release. For more information see Chapter 2.
After defining a metadata object, an application can export that definition in an XML format. Analytic Workspace Manager refers to such a saved definition as a template. An application can also import the XML definition of a metadata object. The
MdmMetadataProvider class has methods for exporting and importing the XML. For more information see "Exporting and Importing Metadata as XML Templates".
With the classes in the
oracle.olap.syntax package, an application can create Java objects that are based on SQL-like expressions, functions, operators, and conditions. The
SyntaxObject class has
toSyntax methods that an application can use to convert SQL expressions into Java objects or to get the SQL syntax from a Java object.
An application can create an
Expression object by using the
SyntaxObject.fromSyntax method or by using a constructor. For example, the following code creates a
StringExpression using a
fromSyntax method and another
StringExpression using a constructor method. The
mp object is the
MdmMetadataProvider for the session.
StringExpression strExp1 = (StringExpression) SyntaxObject.fromSyntax("'Hello world from syntax.'", mp); StringExpression strExp2 = new StringExpression("Hello world from constructor.");
Another new feature is the ability to have multiple user sessions that share the same JDBC connection to the Oracle Database instance and that share the same cache of metadata objects. This ability is provided by the
UserSession class in the
To support legacy applications, the OLAP Java API provides a means of specifying a metadata reader that can recognize metadata objects that were created by a previous method. For more information, see "Supporting Legacy Metadata Objects".