CalculationType: MsCalculationType;
The CalculationType property determines type of metadata where validation detects missing values.
Available values:
MsCalculationType.Pointwise. Validation searches for the missing data in observation attribute values.
MsCalculationType.Serie. Validation searches for the missing data in factor attribute values.
Executing the example requires that the repository contains a time series database with the TSDB_VALIDATION_PARAMETERS identifier containing a validation rule with the VALIDATION identifier.
Add links to the Cubes, Dimensions, Metabase, Ms, Rds system assemblies.
Sub UserProc;
Var
Mb: IMetabase;
RubrObj: IMetabaseObjectDescriptor;
ValidObj: IMetabaseObject;
ValidFilter: IValidationFilter;
MissingMetaData: IValidationMissingMetaData;
SelectionAttrValList: IValidationSelectionValueList;
SelectionAttrFilter: IValidationSelectionFilter;
Rub: IRubricator;
MetaAttr: IMetaAttribute;
ValidMetaAttrs: IValidationMetaAttributes;
Begin
Mb := MetabaseClass.Active;
// Get time series database
RubrObj := Mb.ItemById("TSDB_VALIDATION_PARAMETERS");
Rub := RubrObj.Bind As IRubricator;
// Get validation rule
ValidObj := Mb.ItemByIdNamespace("VALIDATION", RubrObj.Key).Edit;
ValidFilter := ValidObj As IValidationFilter;
// Specify that validation is executed by all levels of calendar frequency
ValidFilter.Level := DimCalendarLevel.None;
// Specify validation type
ValidFilter.Kind := ValidationDetailsKind.MissingMetaData;
// Get parameters of the Missing Metadata validation
MissingMetaData := ValidFilter.Details As IValidationMissingMetaData;
// Set type of checked metadata
MissingMetaData.CalculationType := MsCalculationType.Pointwise;
// Set checked attribute
MetaAttr := Rub.Values.Attributes.FindById("CMT");
ValidMetaAttrs := MissingMetaData.Attributes;
ValidMetaAttrs.Clear;
ValidMetaAttrs.Add(MetaAttr);
// Clear execution area and validation filter
SelectionAttrValList := MissingMetaData.SelectionTargetData;
SelectionAttrValList.Clear;
SelectionAttrFilter := MissingMetaData.SelectionFilter;
SelectionAttrFilter.Clear;
// Save changes
ValidObj.Save;
End Sub UserProc;
After executing the example validation rule of the Missing Metadata type will be set. During its execution the presence of the CMT system attribute value in the factor observation is checked.
See also: