ICubeMetaExporter.ScaleValues

Syntax

ScaleValues: Boolean;

Description

The ScaleValues property determines whether data must be normalized on export.

Comments

When the False value is set, data of every indicator is loaded with measurement unit scale specified for it. Therefore, the uploaded data is non-uniform. When the True value is set, exported data is normalized that is it is brought to one measurement unit scale.

Example

Executing the example requires a time series database with the OBJ_RUBRICATOR identifier. This database must include the COUNTRIES attribute. The file system must contain the C:\result_meta_exp.txt file with indicator values.

Sub UserProc;
Var
    TextConsumer: IDtTextConsumer;
    MB: IMetabase;
    Exporter: ICubeMetaExporter;
    Binding: ICubeMetaExporterBinding;
Begin
    // Data consumer for export to text format
    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;
    // Export options
    Exporter := New CubeMetaExporterClass.Create;
    MB := MetabaseClass.Active;
    Exporter.Rubricator := MB.ItemById("OBJ_RUBRICATOR").Bind As IRubricator;
    Exporter.Consumer := TextConsumer As IDtConsumer;
    Exporter.ScaleValues := True;
    // Binding of the COUNTRIES attribute
    Binding := Exporter.Bindings.Add;
    Binding.FieldName := "CountryKey";
    Binding.DataType := DbDataType.Integer;
    Binding.BindingType := CubeMetaExporterBindingType.Attribute;
    Binding.Attribute := "COUNTRIES";
    Binding.KeyField := "KEY";
    // 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;
    Exporter.ByColumns := False;
    Exporter.CalendarLevel := DimCalendarLevel.Year;
    // Export
    Exporter.Export;
End Sub UserProc;

After executing the example the indicators are exported to the text file. Exported data is normalized.

See also:

ICubeMetaExporter