ActivePivot

ActivePivot

  • 5.9.5
  • Other Versions
  • User Guide
  • Technical Documentation
  • Support

›Copper API

Introduction

  • Overview
  • What's new in ActivePivot

Getting Started

  • Overview
  • AP in a Nutshell
  • Development Environment
  • Download
  • Sandbox Project

Concepts

  • Overview
  • AP Concepts in a Nutshell
  • Data Versioning (MVCC)
  • Partitioning and NUMA
  • Other Concepts

Data Loading

  • Overview
  • Datastore

    • Datastore Configuration
    • Datastore Transactions
    • Store Indexing

    ETL

    • Overview
    • CSV Source
    • JDBC Source
    • Parquet Source

Aggregation & Analytics

  • Overview
  • Cube Configuration
  • Copper API

    • Introduction
    • API
    • Measures
    • Hierarchies
    • Publication
    • Join operations
    • Advanced topics

    Streaming API

    • Continuous Queries

    Advanced APIs

    • Cube Locations
    • Post-Processors
    • Cube Filters
    • Member Properties
    • Context Values

Data Querying

  • Overview
  • Business Frontends
  • Server Endpoints

    • XMLA
    • Datastore REST API
    • Cube REST API
    • Cube Websocket API
  • Datastore Queries
  • MDX

    • MDX Engine Configuration
    • MDX Functions
    • MDX Operators
    • MDX Formats
    • MDX Filtering
    • MDX Snippets
    • MDX Cellsets
  • Drillthrough Extensions

Configuration

  • Overview
  • ContentServer

    • Content Server
    • ContentServer REST API
    • CS Websocket API
  • ActivePivot Properties
  • Internationalization

Security

  • Overview
  • Client/Server Communication

    • Authentication
    • Authorization & Entitlements

    Data Access Control

    • Datastore Access Control
    • ActivePivot Access Control
    • Branch Permission Manager

Distributed Architecture

  • Overview
  • Communication Flows
  • Post-Processors
  • Security
  • What-If
  • Recommendations
  • Distribution Properties

Operations

  • Overview
  • Monitoring

    • Health Dispatcher
    • Query Execution Plan
    • Monitoring Query Execution
    • JMX monitoring
    • Tracing REST API
  • Troubleshooting
  • Performance
  • High Availability

Release & Migration Notes

  • Changelog
  • Migration notes

Reference

  • Javadoc
  • REST APIs

The API

ActivePivot cube builder

Copper calculations are specified in the withCalculations(Consumer<ICopperContext>) method available in the cube builder.

The entry point of Copper API is the "Copper context" or simply the "context", which is aware of the already defined measures and hierarchies. Copper measures and hierarchies are created with the API and then published to the context like so:

.withCalculations(context -> {
    // Here you can describe your calculations with the context
 })

The above snippet shows that all the Copper measures are defined in a single lambda method. For the sake of brevity, all examples from now on only show its body.

Once you have specified your calculations in the lambda, the new measures and hierarchies are added to the pivot description before it is started.

The Copper class provides all the static methods that serve as an entry point for measure and hierarchy creation. All created measures are objects that implement the same interface CopperMeasure, representing the basic bricks of Copper calculations that give you access to methods to build more complex calculations.

Inside the lambda itself, you may also reuse previously published measures or hierarchies for subsequent Copper calculations (pseudo-code):

CopperMeasure m1 = Copper.method(); // Create a measure with a static method from the Copper class
m1.publish(context);
// m1 is now available in following calculations

CopperMeasure m2 = m1.function(); // Apply function() on m1 to create a new measure
m2.publish(context);
// m2 is now available in following calculations

All your measures can be declared within this lambda, in Copper, at the same place and in the same way. This includes CopperMeasures, but also native measures, aggregated measures, as well as legacy post-processors.

← IntroductionMeasures →
  • ActivePivot cube builder
ActivePivot
Community
Stack OverflowLinkedinTwitter
More
Blog
Copyright © 2021 ActiveViam