Skip to main content

%iKnow.DeepSee.MetadataAPI

deprecated class %iKnow.DeepSee.MetadataAPI extends %iKnow.Queries.MetadataI

This class offers a read-only implementation for most of the %iKnow.Queries.MetadataI interface in DeepSee-managed domains. It exposes all available dimension levels and measures for the cube managing the domain. This enables iKnow-style query filtering using the result of CreateFilter() as a convenient alternative to manually instantiating MDX or SQL-based filter objects.

The "virtual" metadata fields exposed this way can be referenced by name or MDX spec and will be resolved as follows:

  1. [dimName].[hierName].[levelName]
  2. dimName.hierName.levelName
  3. [dimName].[levelName]
  4. dimName.levelName
  5. [measures].[msrName]
  6. levelName
  7. msrName
  8. factName

If the spec is not complete (missing hierarchy and/or dimension, the "field name" is resolved as the first level, measure or fact found with a corresponding name. Therefore, it is recommended to use full specifications as soon as there is a potential name conflict. When working with fact names, the values in the cube's Fact table are considered to be the desired results and no star tables will be queried.

For iKnow-managed domains, use %iKnow.Queries.MetadataAPI.

NOTE: this does not support cube relationships or calculated members

Method Inventory

Methods

classmethod AddField(domainId As %Integer, fieldName As %String, supportedOperators As %List, dataType As %String = $$$MDDTSTRING, storage As %Integer = $$$MDSTNORMAL, caseSensitive As %Boolean = 0, lovId As %Integer = -1, validateLov As %Boolean = 1, hidden As %Boolean = 0) as %Integer
Inherited description:

Adds a field definition with the given name and properties.

  • The supportedOperators parameter specifies which operations (such as $$$MDOPEQUAL) will be available for filtering criteria
  • For dataType, choose either $$$MDDTSTRING, $$$MDDTNUMBER or $$$MDDTDATE ($horolog format)
  • Use storage to control the way how values are stored: $$$MDSTNORMAL for cases where you would use a normal index, $$$MDSTBITMAP where you would use a bitmap index (few different metadata values compared to total # of records)
  • If dataType is $$$MDDTSTRING, caseSensitive controls whether or not string values should be treated as case-sensitive.
  • The lovId and validateLov parameters define wheter a List Of Values is available for this metadata field and whether input values should be verified against this list. See also AddListOfValues().
  • If hidden is set to true, the field will by default not appear in metadata field and value lists.
classmethod CreateFilter(pDomainId As %Integer, pFieldName As %String, pOperator As %String, pValue As %String, Output pSC As %Status = $$$OK) as %iKnow.Filters.Filter
Creates a %iKnow.Filters.Filter object for filtering sources according to the provided criteria.
classmethod EndBatch(domainId As %Integer) as %Status
Inherited description:

Ends a metadata batch. See StartBatch() for more details.

classmethod GetFieldId(pDomainId As %Integer, pFieldName As %String, Output pSC As %Status = $$$OK) as %Integer
Returns the full MDX spec for the given pFieldName, which can be used as an identifier for this field.
classmethod GetFieldInfo(pDomainId As %Integer, pFieldName As %String, Output pInfo) as %Status
classmethod GetFieldInfoById(pDomainId As %Integer, pFieldId As %String, Output pInfo) as %Status
classmethod GetFields(ByRef pFields As %Integer, pDomainId As %Integer, pIncludeHidden As %Boolean = 0) as %Status

Returns a list of all the "virtualized" metadata fields exposed for a DeepSee-managed domain in an array: pFields(n) = $lb(fieldName, fullSpec, [dimension|measure]). Please note the returned field names are not necessarily unique across the whole cube, so using the full specificiation (returned as the first column) is safer.

Because of the "virtual" nature of these fields, only the fieldName (2nd) and supportedOperators (3rd) output columns are to be taken into account. The pIncludeHidden parameter is ignored.

classmethod GetValue(pDomainId As %Integer, pFieldName As %String, pExternalId As %String, Output pSC As %Status) as %String
Returns the actual value for a given metadata field (by name) and source (by External ID).
classmethod GetValueById(pDomainId As %Integer, pFieldId As %Integer, pSrcId As %Integer, Output pSC As %Status) as %String
Use GetValue() instead.
classmethod SetValue(domainId As %Integer, fieldName As %String, externalId As %String, value As %String) as %Status
Inherited description:

Sets (or replaces if it exists) the value for a given metadata field (by name) for a given source (by External ID).

Values for fields of type $$$MDDTSTRING are normalized and stripped of whitespace and control characters at the beginning and end of the string.

classmethod SetValueById(domainId As %Integer, fieldId As %Integer, srcId As %Integer, value As %String) as %Status
Inherited description:

Sets (or replaces if it exists) the value for a given metadata field (by ID) for a given source (by Source ID).

Values for fields of type $$$MDDTSTRING are normalized and stripped of whitespace and control characters at the beginning and end of the string.

classmethod StartBatch(domainId As %Integer) as %Status
Inherited description:

Starts a 'batch' during which metadata values can be set. Some setting operations and index recalculations are optimized for batch processing.

NOTE: It is currently up to the user to make sure no metadata values are read during the batch and no values exist already (as replacing a value involves reading it). Reading metadata field values during a batch is not guaranteed to return correct results.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab