2022.07

2022.07

  • Imply
  • Ingest
  • Query
  • Visualize
  • Administer
  • Deploy

›Data cubes

Overview

  • Pivot overview
  • Datasources
  • SQL

Data cubes

  • About data cubes
  • Managing data cubes
  • Visualizations
  • Dimensions
  • Measures
  • Custom dimensions and measures
  • Time compare
  • Filter by measure
  • Annotations
  • Data export

Dashboards

  • Viewing dashboards
  • Creating dashboards
  • Managing dashboards

Alerts & Reports

  • Alerts
  • Scheduled reports

User access

  • Access control
  • User management in Pivot
  • Manage users with LDAP
  • Manage users with OIDC

Advanced features

  • Feature Flags
  • Customizing the Pivot UI
  • Generating links into Pivot
  • Monitor queries
  • Explain
  • CrossTab
  • Pivot server config
  • Plywood Expressions

Pivot API

  • Pivot API overview
  • Pivot users API
  • Pivot UserAuth API
  • Pivot roles API
  • Pivot connections API
  • Pivot data cubes API
  • Pivot dashboards API
  • Pivot alerts API
  • Pivot reports API

Custom dimensions and measures

Plywood expressions use Druid columns, not Pivot dimensions.

You can build custom dimensions and measures using Plywood. Add a Plywood-based dimension or measure to Pivot by entering it in the Formula field of a New dimension or New measure dialog box. See Creating dimensions and Creating measures for more information.

Prerequisites

Before you can build custom dimensions and measures, you must know the following:

  • Dimension fields always start with a $ character in custom mode.
  • Measures always start with a $main object in custom mode.
  • Since measures are always aggregated values, the end result of a custom measure must be an aggregated value.
  • Plywood functions are case-sensitive.
  • Do not add a ; character to the end of your Plywood expression.
  • You cannot build custom dimensions and measures based off other custom dimensions and measures.

Build nested or chained Plywood expressions

You can nest or chain Plywood expressions together. For example, if you are familiar with case, when, else logic from SQL or any programming language, you can create similar logic in Plywood using in, then, fallback expressions, like this: $cityName.in(['London','Aachen','Abbotsford']).then('Match Found').fallback('No Match'). fallback conditions can also contain other expressions, allowing you to create long fallback chains:

($cityName)
  .match('London')
  .then('A')
  .fallback(
    ($cityName)
      .match('Aachen')
      .then('B')
      .fallback(
        ($cityName)
          .match('Abbotsford')
          .then('C')
          .fallback('D')
      )
  )

Examples

For example custom dimensions and measures, see Dimensions and Measures.

Last updated on 7/21/2022
← MeasuresTime compare →
  • Prerequisites
  • Build nested or chained Plywood expressions
  • Examples
2022.07
Key links
Try ImplyApache Druid siteImply GitHub
Get help
Stack OverflowSupportContact us
Learn more
Apache Druid forumsBlog
Copyright © 2022 Imply Data, Inc