ActivePivot

ActivePivot

  • Developer Documentation
  • Versions
  • Help

›CoPPer

Information⌃

  • What's new in ActivePivot
  • Changelog
  • Migration notes

CoPPer⌃

  • Introduction
  • The API
  • Flat and Multi-Dimensional Representations
  • Examples
  • Presentation Meta Data
  • Arithmetic Operations and Edge Cases
  • Advanced Topics

ActivePivot WebSocket API⌃

  • Operation description
  • Payload definition

JDBC Source⌃

  • Introduction
  • Source configuration

ActivePivot Properties⌃

  • ActivePivot Properties

Presentation Meta Data

The columns of CoPPer produce measures that can be queried in a cube, so they contain an additional API to customize the appearance of these measures. These includes:

  • the formatter. The formatter is an advanced plugin key like the ones used in the cube description, like DOUBLE[#,###.00]. It will be used to produce the formatted value of this measure in the result of a MDX query.
  • the folder. This is the folder in which this measure will appear in the cube structure in the user interfaces.
  • the measure group of this measure.

These can be changed on any column by doing for instance:

context
        .createDatasetFromFacts()
        .agg(Columns.sum("likes")
                .withFormatter("DOUBLE[#,###.00;-#,###.00]")
                .withinFolder("simple")
                .withinMeasureGroup("likes"))

Since you will often need to use the same formatter or folder or measure group to many measures, we also added these methods directly on the context object. Calling BuildingContext.withFormatter will produce a new BuildingContext who will apply this formatter to all the created columns. This way the calculations description is shorter. You can thus do:

context
.withFormatter("DOUBLE[#,###.00;-#,###.00]")
.withinFolder("simple")
.withinMeasureGroup("likes")
.createDatasetFromFacts()
    .agg(
            Columns.sum("likes"),
            Columns.min("likes"),
            Columns.max("likes")
);

This way the three created columns will have the same formatter, folder and measure group.

← ExamplesArithmetic Operations and Edge Cases →
ActivePivot
Docs
Getting StartedWikiAPI Reference
Community
Stack OverflowLinkedinTwitter
More
Blog
Copyright © 2019 ActiveViam