ICubeMetaLoader.AutoPeriod

Syntax

AutoPeriod: IRubricatorAutoPeriodDate;

Description

The AutoPeriod property returns parameters of loading period of factors.

Comments

Start and end of period loading matches with start and end of data by default.

Example

Executing the example requires that the repository contains a time series database with the FC_AUTO identifier. The database contains an import object with the OBJ_IMPORT identifier that imports data from all sources except for time series databases. Add links to the Metabase and Cubes system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    RubrDescr: IMetabaseObjectDescriptor;
    ImpRequestDefDescr: IMetabaseObjectDescriptor;
    ImpRequestDef: IImportRequestDefinition;
    MetaLoader: ICubeMetaLoader;
    ImpPeriod: IRubricatorAutoPeriod;
    ImpPeriodDate: IRubricatorAutoPeriodDate;
Begin
    Mb := MetabaseClass.Active;
    RubrDescr := Mb.ItemById("FC_AUTO");
    ImpRequestDefDescr := Mb.ItemByIdNamespace("OBJ_IMPORT", RubrDescr.Key);
    ImpRequestDef := ImpRequestDefDescr.Edit As IImportRequestDefinition;
    MetaLoader := ImpRequestDef.ProviderParams As ICubeMetaLoader;
    ImpPeriod := MetaLoader.AutoPeriod;
    ImpPeriodDate := ImpPeriod.Start;
    ImpPeriodDate.AutoDateType := RubricatorAutoDateType.DateStart;
    ImpPeriodDate.Offset := 1;
    ImpPeriodDate := ImpPeriod.End_;
    ImpPeriodDate.AutoDateType := RubricatorAutoDateType.DateEnd;
    ImpPeriodDate.Offset := -1;
    MetaLoader.IncreasePeriod := True;
    (ImpRequestDef As IMetabaseObject).Save;
End Sub UserProc;

After executing the example parameters of time series import period are changed:

See also:

ICubeMetaLoader