IImportRequestProviderParams.AutoPeriod

Syntax

AutoPeriod: IRubricatorAutoPeriod;

Description

The AutoPeriod property returns parameters of factors import period.

Comments

By default, start and end of loading period matches with the start and end of data.

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;
    ImpProvParams: IImportRequestProviderParams;
    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;
    ImpProvParams := ImpRequestDef.ProviderParams;
    ImpPeriod := ImpProvParams.AutoPeriod;
    ImpPeriodDate := ImpPeriod.Start;
    ImpPeriodDate.AutoDateType := RubricatorAutoDateType.DateStart;
    ImpPeriodDate.Offset := 1;
    ImpPeriodDate := ImpPeriod.End_;
    ImpPeriodDate.AutoDateType := RubricatorAutoDateType.DateEnd;
    ImpPeriodDate.Offset := -1;
    ImpProvParams.IncreasePeriod := True;
    (ImpRequestDef As IMetabaseObject).Save;
End Sub UserProc;

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

See also:

IImportRequestProviderParams