Skip to main content

%DeepSee.CubeDefinition

abstract class %DeepSee.CubeDefinition extends %Library.RegisteredObject

Subclasses of this class are used to define "cubes" that can be queried by the DeepSee engine.
The Cube XDATA block defines the contents of a DeepSee cube (dimensions and measures) as an XML document. When a subclass of this class is compiled, it generates the indexed fact table that holds the data for this cube.
This class also provides the APIs needs to explore a cube's metadata that are used by the DeepSee utilities.

Method Inventory

Parameters

parameter TRANSFORMERCLASS;
This parameter is used to transform original cube definition. If it is defined in a subclass then the cube definition is piped through the transformation defined in the class named by this parameter.
parameter TRANSFORMXSL;
This parameter is used to transform original cube definition. If it is defined in subclass then the cube definition is piped through XSLT transformation. XSL is taken from XData block named in this parameter.
parameter USECUBEVERSIONS = 0;
This parameter controls whether the compile of this class will utilize the cube versioning mechanism. If set to 1, the current class definition will act as a generator for a distinct version of the cube.
The version attribute of the <cube> tag must be set if this is set to 1.

Methods

classmethod %CanDrillThrough() as %Boolean
Test if this cube supports drill through (listing) queries.
classmethod %CheckSourceId(pSourceId As %String, pVerbose As %Boolean = 0, pStatus As %Status) as %Boolean
Check to make sure a given ID exists in the source table.
classmethod %DeleteFact(pSourceId As %String) as %Status
Delete facts from this cube that correspond to rows in the source table with source id pSourceId
. If pVerbose is true, then write status information to the console.
classmethod %GetCubeCaption() as %String
Return the caption of the cube defined by this class. If not defined, the cube name is returned.
classmethod %GetCubeName() as %String
Return the logical name of the cube defined by this class (in its original case).
final classmethod %GetDefaultListing() as %String
Return the name of the default listing for this cube, if any.
classmethod %GetFactClass() as %String
Return name of the fact class used by this cube.
classmethod %GetFactCount() as %Integer
Return number of facts in this cube's fact table.
final classmethod %GetFactIdRange(Output pStartId As %Integer, Output pEndId As %Integer) as %Status
Return the approximate starting and ending id values for this cubes fact table.
final classmethod %GetFilterSpec() as %String
Return the filter spec for this cube, if any.
classmethod %GetPrecomputeLevel() as %Integer
Return the precompute level of the cube defined by this class.
classmethod %GetRelationshipId(pRelationName As %String, pKey As %String, Output pID As %Integer) as %Status
Take cube relationship with name pRelationName and transform the original key value pKey into the id of the corresponding fact in the fact table and return it via pID.
classmethod %InjectFact(ByRef pFactId As %String, ByRef pValues As %String, pDimensionsOnly As %Boolean = 0, pFactList As %String = "") as %Status
Inject a fact into the fact table for this cube that is not associated with the source data table.
pFactId is the id of the fact in the fact table. Set this to "" for an insert. On return it will contain the id used for the fact.
pValues is an array of fact values subscripted by sourceProperty name (case must match exactly. If pDimensionsOnly is true, then only the dimension tables for the cube are affected; no facts are inserted.
classmethod %IsAbstract() as %Boolean
Test whether this cube is abstract or not.
classmethod %IsCompound(Output pJoinList As %String) as %Boolean
Test whether this cube is compound or not.
final classmethod %KillCache() as %Status
Delete all cached values for this cube.
final classmethod %KillCellCache() as %Status
Delete the cell cache for this cube.
classmethod %KillFacts() as %Status
Delete all Facts as well as cached results from the cube.
final classmethod %KillResultsCache() as %Status
Delete the results cache for this cube.
classmethod %Lookup(pTermList As %String = "", pKey As %String = "", pDefault As %String, pField As %String = "VALUE") as %String
Lookup a single value with the given key and DeepSee term list name. This can be invoked by source expressions within this cube.
pTermList is the name (with no extension) of the termlist.
pKey is the key to lookup within the termlist.
pDefault is an optional default value to return if the key is not found within the termlist.
pField is an optional field to lookup within the termlist. By default, this is the "value" field.
classmethod %OnAfterBuildCube(pBuildStatus As %Status, pBuildErrors As %Boolean = 0) as %Status
Notification that this cube has completed its build.
The status of the overall build is contained in pBuildStatus. If the build is otherwise successful, the value of pBuildStatus can be changed within the callback to become the new status returned by %BuildCube. If there were any build errors in the individual facts the count of these errors is reported in pBuildErrors
abstract classmethod %OnAfterProcessFact(pID As %String, ByRef pFactArray As %String, pUpdateStatus As %Status) as %Status
Notification that a fact within the cube has been processed (inserted or updated). This method does not allow for any intervention of the processing of the fact, but rather provides an opportunity to react to success or failure in processing. The return status is ignored by the caller.
pID is the id of the row in the source data being processed.
pFacts is an array containing the values that will be used for the row, subscripted by fact name.
pUpdateStatus is the status about to be returned by %ProcessFact. If an error is passed in, this error will already be logged in the DeepSee logs and the ^DeepSee.BuildErrors global.
classmethod %OnApplyOverrides() as %Status
If implemented, this is called before the cube model is processed. It gives the class a change to modify the ^DeepSee.Overrides global.
classmethod %OnBuildCube(pFactList As %List) as %Status
Notification that this cube is about to be built.
If the build is invoked using a selected pFactList, this list will be passed to the callback in a $LB format.
classmethod %OnExecuteListing(pSQL As %String) as %Status
Notification that a listing (drillthrough) query is about to be executed.
This is called immediately before a listing query is executed. This is useful for cases where additional setup work is required before a listing query can run.
pSQL is the listing query that will be executed.
classmethod %OnGetComputedMembers(pDimName As %String, pHierName As %String, pLevelName As %String, ByRef pMemberList, pRollupKey As %String = "", ByRef pRange As %String = "") as %Status
This callback gives a Cube a chance to programmatically provide a set of members for a computed dimension.
Find the set of members for this computed dimension object satisfying pRollupKey and pRange (if applicable for this implementation).
This is passed and returns:
pMemberList($I(pMemberList)) = $LB(id (expression for MDX computed dimension),caption,key,[format])
classmethod %OnGetDefaultListing() as %String
This callback gives a cube a chance to programmatically return the name of the listing to use as its default listing. This must be the name of a defined listing within the cube. Return "" to use the pre-defined default listing.
classmethod %OnGetFilterSpec(pFilterSpec As %String) as %String
This callback gives a Cube a chance to programmatically define a filter spec.
abstract classmethod %OnGetSourceIds(Output pStartId As %String, Output pEndId As %String) as %Status
If implemented, this method is called when a cube is being completely rebuilt *and* the rebuild is not using parallel processing.
On return pStartId and pEndId must contain the first and last row id values for this cube's source data table, such that a query of the form:
SELECT ... FROM SOURCE WHERE %ID BETWEEN pStartId AND pEndId
will return all the rows of the source table.
This gives the developer the opportunity to bypass the built-in query that fetchs these values.
classmethod %OnKillFacts() as %Status
Notification that all facts have been deleted.
If implemented, this is called when the %KillFacts() is called.
abstract classmethod %OnProcessFact(pID As %String, ByRef pFacts As %String, Output pSkip As %Boolean, pInsert As %Boolean) as %Status
Notification that a fact within the cube is to be processed (inserted or updated).
pID is the id of the row in the source data being processed.
pFacts is an array containing the values that will be used for the row, subscripted by fact name.
pSkip is a boolean value returned by reference; If true then the record is not processed.
pInsert is true if the current fact will be inserted into the cube's fact table.
classmethod %Rule(pRuleName As %String = "") as %String
Invoke a Business Rule on the current record within the source class. pID should contain the object id of the record within the source class. This can be invoked by source expressions within this cube.
classmethod %UpdateFacts(pStartId As %String, pEndId As %String = "", pBatchMode As %Boolean = 0, pVerbose As %Boolean = 0, pTaskGroup As %String = "", Output pUpdates As %Integer, pRefProp As %String = "", pRefID As %String = "", ByRef pDimTables) as %Status
Update Fact indices with data from the source table.
Read all rows from the source table between pStartId and pEndId.
If pEndId is missing (""), then update one fact with source id pStartId
. If pVerbose is true, then write status information to the console.
pTaskGroup is used when this method is called by the DeepSee TaskMaster.
If pBatchMode is true, then perform the update in batch mode.
classmethod %UpdateFactsList(pFactList As %String = "", pStartId As %String, pEndId As %String = "", pBatchMode As %Boolean = 0, pVerbose As %Boolean = 0, pTaskGroup As %String = "", Output pUpdates As %Integer, pRefProp As %String = "", pRefID As %String = "", ByRef pDimTables) as %Status
Update Fact indices with data from selected columns in the source table.
The fact list is limited using the pFactList parameter, which can be either a comma-delimited list or a $LB. Read all rows from the source table between pStartId and pEndId.
If pEndId is missing (""), then update one fact with source id pStartId
. If pVerbose is true, then write status information to the console.
pTaskGroup is used when this method is called by the DeepSee TaskMaster.
If pBatchMode is true, then perform the update in batch mode.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab