Skip to main content

<cube>

Defines a Business Intelligence cube.

<cube>

The <cube> element contains the following contents:

Attribute or Element Purpose
name, displayName, description, disabled See Common Attributes in a Cube.
sourceClass Complete package and class name of the base class used by this cube. See Possible Source Classes for a Cube
owner (Optional) Name of owner of cube.
resource (Optional) Name of the resource used to control access to this cube, when it is accessed via the Architect. See Implementing InterSystems Business Intelligence.
caption (Optional) Caption to display in the Analyzer and other utilities when working with this cube.
countMeasureCaption (Optional) Caption to use for the default measure, which counts records. The default caption is Count. Internally, the name of the measure is %Count.
countMeasureName (Optional) Name to use for the default measure, which counts records. The default name of this measure is %Count.
defaultListing (Optional) Specify the logical name of the <listing> to use as the default in this cube. See <listing>, later in this page.
nullReplacement (Optional) Specifies the string to use as the member name if the source data for a level is null. For example, specify nullReplacement="None"

This option is overridden by the nullReplacement attribute, if specified, for a given <level>.

bucketSize (Optional) Specifies the size of the caching buckets used for this cube. A group is 64,000 contiguous rows, and a bucket is an integer multiple of groups. The default bucket size is 8. That is, by default, the first 512,000 rows are bucket number 1, the next 512,000 rows are bucket number 2, and so on.

In some cases, you may want to increase this value if you expect to have a large number of facts and do not expect many updates to older values within the cube. If you change this value, be sure to delete all cached results for this cube. To do so, call the %KillCache() method of the cube definition class.

actionClass (Optional) Specifies an associated KPI class that defines actions that are available for pivot tables based on this cube. Specify the full package and class name of a subclass of %DeepSee.KPIOpens in a new tab.
maxFacts (Optional) Specifies the maximum number of rows in the fact table. This determines the number of rows of the base table that the system uses when building the cube. Use this attribute to assist in debugging when you do not want to process the entire base table. By default, all rows of the base table are processed.
bitmapChunkInMemory (Optional) Controls how the system builds the indexes: using a process-private global (slower but does not lead to <STORE> errors) or entirely in memory (faster). The default is "false", in which case the system uses a process-private global for temporary storage while it builds in the indexes.

If your cube does not contain a large number of indexes (dimensions and measures) and does not contain dimensions with very large numbers of members, you can use "true" for faster performance. It is worthwhile to try this setting; if you encounter <STORE> errors when you build the cube, then change the value back to the default.

initialBuildOrder (Optional) Used to construct an optional ORDER BY clause for use when building the entire cube; does not affect incremental updates. Specify a comma-separated list of fields in the source table. You can use the SQL keywords ASC and DESC. For example: "Age DESC,Gender"
buildRestriction (Optional) Specifies an optional WHERE clause to use when building or updating the cube; this causes the cube to use a subset of the records. Specify an SQL comparison expression that uses fields in the source table. For example: Gender='F'. Has no effect on a cube based on a data connector.
abstract (Optional) See Using Cube Inheritance to Define Reusable Elements.
inheritsFrom
disableListingGroups (Optional) Specify this attribute as "true" if you want to prevent anyone from defining a listing group that uses this cube as a target. The default is "false". See Compiling a Listing Group.
version (Optional) See Using Cube Versions.
namedFactNums (Optional) When this attribute is "true", each measure, level, or relationship of the cube requires a fact number to be defined. Setting this attribute to "true" is equivalent to enabling Selective Build.
defaultMeasure, defaultMember, precompute Do not use.
<measure> (Optional) You can include zero or more <measure> elements, each of which defines a measure.
<dimension> (Optional) You can include zero or more <dimension> elements, each of which defines a dimension.
<listing> (Optional) You can include zero or more <listing> elements, each of which defines a listing, to be available in the Analyzer.
<listingField> (Optional) You can include zero or more <listingField> elements, each of which defines a listing, to be available in the Analyzer.
<namedSet> (Optional) You can include zero or more <namedSet> elements, each of which defines a named set, which is an alias for a member or for a set of members.
<calculatedMember> (Optional) You can include zero or more <calculatedMember> elements, each of which defines a member that is calculated in terms of other members. This is typically used to define measures that are calculated based on other measures.
<relationship> (Optional) You can include zero or more <relationship> elements. A <relationship> element connects another cube to your cube so that you can use levels of that other cube when you query your own cube.
<index> (Optional) You can include zero or more <index> elements, each of which defines an optional, custom index on the fact table. This can be useful if you plan to run SQL queries on the fact table. For information on the fact table, see Details for the Fact and Dimension Tables.
<expression> (Optional) You can include zero or more <expression> elements, each of which defines an expression (typically an intermediate value), for use in the definition of one or more measures or dimensions. Values of expressions are not stored but are available during cube build time.

Example

<cube 
name="Patients"  
 owner="_SYSTEM"
 caption="Patients"
 sourceClass="BI.Study.Patient"
 >
...
FeedbackOpens in a new tab