A reasoner that sets properties of the cube based on heuristics.
The reasoner performs two functions:
- Set formulas for dimensions, levels and attributes.
- Define the
rollUpTo relationships between levels
The reasoner uses the heuristic rules described below.
In these descriptions,
?source denotes the variable used
for a
cadl:source of the Cube.
-
If the local name
source is case-insenstive-equal to the local name of
a unique owl:Class, then that owl:Class is set as the `cadl:valueType`
of the source.
-
If the local name of a Dimension ends with the suffix "Dim" (e.g. "accountDim"), then let
let dimName be the part of the name preceding the suffix (e.g. "account"). Otherwise, let
dimName be the entire local name of the Dimension. If dimName uniquely matches the local name of
a property of ?source, then the formula for the dimension has the form: ?source.{dimName}
-
If the local name of a Level is equal to the
dimName value for the declaring
Dimension, then the formula for the Level is identical to the formula for the Dimension.
-
Let levelB be some Level. If the local name of levelB uniquely matches the local name of
a property of a preceding Level (call it levelA), then
-
The formula of the levelB is given by {formula-of-levelA}.{local-name-of-levelB}
- The relationship, levelA cadl:rolesUpTo levelB is asserted.
-
Let attrName be the local name of an Attribute. If attrName uniquely matches the local name
of a property of the declaring Level, then the formula for the Attribute shall be given by
{levelFormula}.{attrName}
-
Let dim be a Dimension whose rdf:type is xsd:dateTime. Then the following rules apply.
-
If the name of a Level is case-insensitive-equal to a time unit (such as "DAY"),
then the formula for the Level is given by: DATE_TRUNC({levelName}, {formula-of-dim})
-
The levels of dim shall be sorted by granularity and roll-up relationships established
based on that order.