ICubeMetaLoader.SkipEmptyRows

Syntax

SkipEmptyRows: Boolean;

Description

The SkipEmptyRows property determines whether to skip empty rows on data import.

Comments

Available values:

Example

Executing the example requires that the repository contains a time series database with the TSDB_IMPORT identifier containing an import object with the OBJ_IMPORT identifier. This object must import data from any source except for time series database.

Add links to the Cubes and Metabase system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    RubrKey: Integer;
    ImpRequestDefDescr: IMetabaseObjectDescriptor;
    ImpRequestDef: IImportRequestDefinition;
    MetaLoader: ICubeMetaLoader;
Begin
    // Get repository
    Mb := MetabaseClass.Active;
    // Get time series database
    RubrKey := Mb.GetObjectKeyById("TSDB_IMPORT");
    // Get import object
    ImpRequestDefDescr := Mb.ItemByIdNamespace("OBJ_IMPORT", RubrKey);
    // Get time series loading parameters
    ImpRequestDef := ImpRequestDefDescr.Edit As IImportRequestDefinition;
    MetaLoader := ImpRequestDef.ProviderParams As ICubeMetaLoader;
    // Specify that on import of values that do not correspond to consumer field type
    // the Null value is written
    MetaLoader.LoadNullForMissMatchValueType := True;
    // Specify that on import a series is overwritten
    MetaLoader.OverWriteWholeFactorValues := True;
    // Set length of string field in data source
    MetaLoader.SourceFieldStringSize := 100;
    // Specify that on import of values empty rows are skipped
    MetaLoader.SkipEmptyRows := True;
    // Specify that on import time series period is not decreased
    // in time series database
    MetaLoader.DecreasePeriod := False;
    // Specify that date recognition error must be logged
    MetaLoader.LogDateParseError := True;
    // Save changes
    (ImpRequestDef As IMetabaseObject).Save;
End Sub UserProc;

After executing the example import object parameters are changed: empty rows are skipped on import, date recognition errors are logged, series are overwritten. Row field length is also changed in data source, and if imported value does not correspond to field consumer type, the Null value is written.

See also:

ICubeMetaLoader