%DeepSee.Model.measure
Class %DeepSee.Model.measure Extends (%DeepSee.Model.node, %DeepSee.Model.source) [ Inheritance = right, System = 3 ]
Meta-data object that represents a measure within a DeepSee cube.
At query processing time, a measure is treated as if it were a member of a special dimension called "Measures".
Properties
cube
Relationship cube As %DeepSee.Model.cube(XMLPROJECTION = "none") [ Cardinality = one, Inverse = measures ];
Cube that this measure belongs to.
aggregate
Property aggregate As %DeepSee.Datatype.string(VALUELIST = ",COUNT,SUM,MIN,MAX,AVG", XMLPROJECTION = "attribute");
Default aggregate function applied to this measure.
If not specified, the default aggregate for numeric measures is SUM and COUNT for all other types.
type
Property type As %DeepSee.Datatype.string(VALUELIST = ",integer,number,boolean,string,date,age,text,iKnow", XMLPROJECTION = "attribute");
This indicates the type of this measure.
The type specifies how this measure is used within MDX processing. The type can be one of the following:
- "integer" - the measure contains an integer value that can be aggregated within an MDX query. If no aggregate is specified, then SUM is used.
- "number" - the measure contains a numeric value that can be aggregated within an MDX query. If no aggregate is specified, then SUM is used.
- "boolean" - the measure contains a boolean value that can be aggregated within an MDX query. If no aggregate is specified, then COUNT is used (which is equivalent to SUM).
- "date" - the measure contains a date value (in +$H format). The only aggregates that can be used with a date measure are MIN, MAX, and AVG. If no aggregate is specified, then MAX is used.
- "age" - the measure contains an age value (in days). The only aggregates that can be used with an age measure are MIN, MAX, and AVG. If no aggregate is specified, then AVG is used.
- "string" - the measure contains a string value. The only aggregate that can be used with a string measure is COUNT. A string measure can be used as a way to add arbitrary data to a cube's fact table. String measures are not indexed.
- "text" - similar to a "string" measure, except that it is indexed using a text index.
- "iKnow" - a text value that is processed and indexed using the iKnow Smart Indexing API. If not specified then the type will match the source property, as best as possible or be set to "number".
scale
Property scale As %Integer(MINVAL = 0, XMLPROJECTION = "attribute");
The scale value (number of digits following the decimal point) used for numeric measures. If not specified, then the scale of the source property is used, if possible.
hidden
Property hidden As %Boolean(XMLPROJECTION = "attribute") [ InitialExpression = 0 ];
If true, this measure is hidden. That is, it will not be listed among the cube's members within the various DeepSee utilities.
It can still be used within MDX queries and expressions.
searchable
Property searchable As %Boolean(XMLPROJECTION = "attribute") [ InitialExpression = 0 ];
If true, this measure can be used to filter results.
Setting this true may result in additional indices being defined for this measure.
formatString
Property formatString As %DeepSee.Datatype.string(MAXLEN = 100, XMLPROJECTION = "attribute");
Optional format string to apply to this member.
units
Property units As %DeepSee.Datatype.string(XMLPROJECTION = "attribute");
Optional. Units applied to this measure.
This is not currently used.
iKnowSource
Property iKnowSource As %DeepSee.Datatype.string(VALUELIST = ",string,stream,file,domain", XMLPROJECTION = "attribute");
If this is an "iKnow" measure, then this indicates the type of the source text for this measure:
"string" -- source is a string property or expression,
"stream" -- source is a character stream property,
"file" -- source is a string containing a file name.
"domain" -- source is a string containing the external ID of a text already indexed in a domain identified by the iKnowDomain attribute.
For other measure types, this attribute is ignored.
iKnowDomain
Property iKnowDomain As %DeepSee.Datatype.string(XMLPROJECTION = "attribute");
If this is an "iKnow" measure and iKnowSource="domain", this attribute indicates which domain the text corresponding to this fact is stored in.
iKnowParameters
Property iKnowParameters As %DeepSee.Datatype.string(XMLPROJECTION = "attribute");
If this is an "iKnow" measure, this property can be used to supply additional domain parameters for the corresponding iKnow domain. This should be a semicolon-delimited list of double-colon-delimited parameter-name / parameter-value pairs. For example: "DefaultConfig::Spanish;Mat:DefaultProfile::-1" will force this domain to use the Configuration named "Spanish" and default Matching Profile -1. NOTE: this attribute cannot be used for iKnow-managed domains
iKnowDictionaries
Property iKnowDictionaries As %DeepSee.Datatype.string(XMLPROJECTION = "attribute");
If this is an "iKnow" measure, use this property to identify which Term Lists should be loaded as dictionaries for iKnow to match the iKnow measures text contents against. This attribute should contain a comma-separated list of existing Term List names. NOTE: this attribute cannot be used for iKnow-managed domains
listingFilterValue
Property listingFilterValue As %DeepSee.Datatype.string(XMLPROJECTION = "attribute");
listingFilterOperator
Property listingFilterOperator As %DeepSee.Datatype.string(XMLPROJECTION = "attribute");
factNumber
Property factNumber As %DeepSee.Datatype.string(XMLPROJECTION = "attribute");
Define a stable fact number for this measure
Methods
%Validate
Method %Validate() As %Status
Test if this measure's definition is valid. As a side-effect, set the aggregate function if not specified.
%AtScaleExport
Method %AtScaleExport(pStatus As %Status = {$$$OK}, ByRef pAuxiliaryIndex As %DynamicAbstractObject = {$$$NULLOREF}) As %DynamicAbstractObject
Produce the structures needed to emit the appropriate JSON and export this item to AtScale