IImportRequestProviderParams.TreatEmptyStringAsNull

Syntax

TreatEmptyStringAsNull: Boolean;

Description

The TreatEmptyStringAsNull property determines whether to write empty strings as Null.

Comments

The TreatEmptyStringAsNull property is used to load data only into non-version time series databases.

Available values:

Example

Executing the example requires that the repository contains a non-version time series database with the TSDB_NON_REV 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;
    ImpProvParams: IImportRequestProviderParams;
Begin
    // Get repository
    Mb := MetabaseClass.Active;
    // Get time series database
    RubrKey := Mb.GetObjectKeyById("TSDB_NON_REV");
    // Get import object
    ImpRequestDefDescr := Mb.ItemByIdNamespace("OBJ_IMPORT", RubrKey);
    // Get time series loading parameters
    ImpRequestDef := ImpRequestDefDescr.Edit As IImportRequestDefinition;
    ImpProvParams := ImpRequestDef.ProviderParams;
    // Specify that empty strings are written as Null
    ImpProvParams.TreatEmptyStringAsNull := True;
    // Save changes
    (ImpRequestDef As IMetabaseObject).Save;
End Sub UserProc;

After executing the example import object parameters are changed: empty values are written as Null.

See also:

ICubeMetaLoader