ICubeMetaExporter.ExportMode

Syntax

ExportMode: CubeLoadClearMode;

Description

The ExportMode property determines a time series export mode.

Comments

If time series export mode is set, it is affected by value of the ExportMode property. For details see description of the ICubeMetaExporter.AutoPeriod property.

Example

Executing the example requires that the repository contains a time series database with the TSDB identifier.

Add links to the Cubes, Dal, Db, Dt and Metabase system assemblies.

Sub UserProc;
Var
    TextConsumer: IDtTextConsumer;
    MB: IMetabase;
    Exporter: ICubeMetaExporter;
    Binding: ICubeMetaExporterBinding;
Begin
    // Create a data consumer for export to text file
    TextConsumer := New DtTextConsumer.Create;
    TextConsumer.File := "C:\result_meta_exp.txt";
    TextConsumer.FormatType := DtTextFormatType.Delimited;
    TextConsumer.DelimitedColumnDelimiter := ";";
    TextConsumer.DelimitedTextQualifier := """";
    TextConsumer.Encoding := "WIN";
    TextConsumer.WriteHeader := True;
    // Create an object for export
    Exporter := New CubeMetaExporterClass.Create;
    // Get current repository
    MB := MetabaseClass.Active;
    // Specify data source and data consumer
    Exporter.Rubricator := MB.ItemById("TSDB").Bind As IRubricator;
    Exporter.Consumer := TextConsumer As IDtConsumer;
    // Add a calendar binding
    Binding := Exporter.Bindings.Add;
    Binding.FieldName := "Year";
    Binding.DataType := DbDataType.String;
    Binding.BindingType := CubeMetaExporterBindingType.Calendar;
    Binding.DateFormat := "$Year$";
    Binding.ValueFieldName := "Value";
    Binding.ValueDataType := DbDataType.Float;
    // Specify that only point values are exported
    Exporter.ExportMode := CubeLoadClearMode.DataOnly;
    // Execute export
    Exporter.ClearBeforeExport := True;
    Exporter.Export;
End Sub UserProc;

After executing the example only point values are loaded to the C:\result_meta_exp.txt file.

See also:

ICubeMetaExporter