In this article:

Description

Structure of system metadictionaries

Structure of fact metadictionary

Structure of time series values metadictionary

Structure of revisions metadictionary

Structure of validation rule execution metadictionary

Structure of metadictionary of exceptions detected by validation rules

Features of Data Storage in Time Series Database

Description

To store data, time series database uses several child system metadictionaries located in the Data folder. Metadictionaries are created automatically on creating a time series database.

Metadictionary data can be accessed from the object navigator or by means of the Fore language using the methods IRubricator.GetDictionary and IRubricatorInstance.GetDictionary.

Structure of system metadictionaries

See below the structure of main system metadictionaries used to store data in time series database.

Structure of fact metadictionary

Fact metadictionary contains data about time series contained in time series database.

Metadictionary name is created according to the following scheme: Facts_<time series database name>. For example, a time series metadictionary in the Statistics time series database is named facts_Statistics.

A metadictionary may contain the following attribute types: system or user ones. System attributes are created automatically on creating a time series database. User attributes are created if a user creates additional time series attributes.

System attributes of fact metadictionary:

Attribute name Attribute identifier Data type Attribute features Description
Key KEY Integer Empty values are not allowed Primary key.
Fact FACTOR Integer Empty values are not allowed Time series key.
Revision REV Integer Empty values are not allowed Revision key.
Frequency DL Integer Empty values are not allowed. Default value is 1. Time series calendar frequency. Frequency is determined by the DimCalendarLevel enumeration.
Unit UNIT Integer If measurement units are a mandatory series attribute, empty values are not allowed; if measurement units are not a mandatory series attribute, empty values are allowed. Measurement unit for series values.
Object OBT Integer   key of repository object connected to series. Value is edited only by means of Fore.
Mnemonic MNEMO String Empty values are not allowed. Default length is 255 characters. The attribute is present if on creating a time series database it was specified that series have identifiers.
The attribute may be absent in metadictionary. Presence or absence of the attribute is controlled by the IRubricator.HasMnemonics property.
Time series mnemonic. Mnemonic is a unique value generated based on time series attribute values and is used as a series name.
Removed DLT Logical Empty values are not allowed. The default value is False. Indicates whether a time series is removed. Available values:
  • True. The series is present in time series database.

  • False. The series is removed.

Empty EMPT Logical Empty values are not allowed. The default value is True.
The attribute is present if on creating a time series database was specified that series are empty.
The attribute may be absent in metadictionary. Presence or absence of the attribute is controlled by the IRubricator.HasEmptyAttribute property.
Indicates whether a time series is empty, and a series is considered empty is it does not contain data.
Available values:
  • True. Series is empty.

  • False. Series contains data.

Structure of time series values metadictionary

Values metadictionary contains values of time series observations.

Metadictionary name is created according to the following scheme: Values_<time series database name>. For example, metadictionary of time series values is named Values_Statistics in the Statistics time series database.

A metadictionary may contain the following attribute types: system or user ones. System attributes are created automatically on creating a time series database. User attributes are created if a used creates additional attributes of observations.

System attributes of metadictionary of time series values:

Attribute name Attribute identifier Data type Field features Description
Key KEY Integer Empty values are not allowed Primary key.
Fact FACTOR Integer Empty values are not allowed Key of the time series, to which observation belongs.
Revision REV Integer Empty values are not allowed Key of the revision, to which observation value is set or changed.
Frequency DL Integer Empty values are not allowed Calendar frequency of observation. Frequency is determined by the DimCalendarLevel.
Date DT Date Empty values are not allowed Date, to which observation value is set.
Scenario SC Integer Empty values are not allowed. The default value is -1. Scenario key, to which observation belongs. If the value is -1, the observation belongs to the Fact scenario.

NOTE. The attribute is present if a time series database does not support scenarios. For details see description of IRubricator.HasScenarioDimension.

Value VL Real Total length is 30 characters, the number of decimal places is 8. Observation value.
Comment CMT String The default length is 255 characters Comment to observation.
Features of values metadictionary

If a time series database uses a MS SQL, based database, the VL attribute can be allowed to have any total length of characters. To do this, use the given below procedure.

The procedure is given for a time series database with the TSDB identifier.

Add links to the Cubes, Metabase, Rds system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    rub: IRubricator;
    attr: IMetaAttribute;
Begin
    mb := MetabaseClass.Active;
    rub := mb.ItemById("TSDB").Edit As IRubricator;
    attr := rub.EditValues.Attributes.FindById("VL");
    attr.FieldSize := 0;
    rub.AlterAndSave;
End Sub UserProc;

After executing the procedure the VL attribute can have any total length of characters in the TSDB time series database.

IMPORTANT. Restriction for a general length of characters is removed by means of setting the float data type for attribute at the DBMS level. It leads to the loss of accuracy after the 17th character.

Structure of revisions metadictionary

Revisions metadictionary contains data about revisions executed in time series database.

Metadictionary name is created according to the following scheme: Revisions_<time series database name>. For example, revisions metadictionary may be named Revisions_Statistics in the Statistics time series database.

Attribute name Attribute identifier Data type Field features Description
Key KEY Integer Empty values are not allowed Primary key.
Name NAM String The default length is 255 characters Revision name.
Date DT Date   Revision execution date.
View KIN Integer   Indicates whether this revision is displayed in the revision dictionary. Available values:
  • 0. Revision is not displayed.

  • 1. Revision is displayed.

User USR String The default length is 255 characters User who executed revision.
Comment CMT String The default length is 255 characters Comment to revision execution.
Object OBT Integer   Key of the repository object, which initiated revision.

Structure of validation rule execution metadictionary

Metadictionary of validation rule execution contains data about validation rules and validation rule groups executed based on time series database.

Metadictionary name is created according to the following scheme: Rule executions_<time series database>. For example, revision metadictionary may be named Rule executions_Statistics in the Statistics time series database.

Attribute name Attribute identifier Data type Field features Description
Key KEY Integer Empty values are not allowed Primary key.
Name NAM String The default length is 255 characters Name of validation executions rule.
Revision REV Integer Empty values are not allowed Key of the revision, in which the rule is executed.
Object OBT Integer   Key of validation rule as repository object.
Date DT Date   Validation rule execution date.
Rule CMT Integer   The list of validation keys included into calculated validation group. If one validation is calculated, its key.
Validation calcualtions BY_SC Integer   Indicates whether validation is calculated by a scenario.
Available values:
  • None. Validation rule is not calculated by a scenario.

  • 1. Validation rule is calculated by a scenario.

Calculation end FNSH Logical   Indicates whether validation rule execution is finished. Available values:
  • 0. Validation rule is being executed.

  • 1. Validation rule is already executed.

Structure of metadictionary of exceptions detected by validation rules

Metadictionary of exceptions detected by validation rules contains data about observations of the time series excluded by validation rules executed in time series database.

Metadictionary name is created according to the following scheme: Rule values_<time series database name>. For example, revision metadictionary may be named Rule values_Statistics in the Statistics time series database.

Attribute name Attribute identifier Data type Field features Description
Key KEY Integer Empty values are not allowed Primary key.
Fact FACTOR Integer Empty values are not allowed Key of the time series, to which observation belongs.
Frequency DL Integer Empty values are not allowed Calendar frequency of observation. Frequency is determined by the DimCalendarLevel enumeration.
Date DT Date   Observation date.
Rule CMT Integer   Validation rule execution key.
The key can be used to find corresponding record in validation rule execution metadictionary.
Value VL Integer   Indicates whether value exists in validation exception matrix. The attribute value is 1, if exception is explained, and the attribute value is empty, if exception is not explained.
Scenario SC Integer Empty values are not allowed Scenario key, to which observation belongs. If the value is -1, the observation belongs to the Fact scenario.

NOTE. The attribute is present if a time series database does not support scenarios. For details see description of IRubricator.HasScenarioDimension.

See also:

Developers Knowledge Base