Recipes
These recipes will show you the best practices of using Cube.
Analytics
- Calculating daily, weekly, monthly active users
- Implementing event analytics
- Implementing funnel analysis
- Implementing retention analysis & cohorts
Authentication & Authorization
- Authenticate requests to the SQL API with LDAP
- Authenticate requests to the REST API with Auth0
- Authenticate requests to the REST API with AWS Cognito
- Authenticate requests to the REST API with Firebase (opens in a new tab)
Data sources
- Using multiple data sources
- Using SSL connections to a data source
- Joining data from multiple data sources
Data modeling
- Calculating average and percentiles
- Calculating nested aggregates
- Calculating period-over-period changes
- Implementing custom time dimension granularities
- Implementing Entity-Attribute-Value model
- Implementing data snapshots
- Using different data models for tenants
- Using dynamic measures
- Using dynamic union tables
- Working around string time dimensions
Code reusability
Access control
- Enforcing role-based access
- Enforcing column-based access
- Enforcing mandatory filters
- Controlling access to cubes and views
Multitenancy
Queries
- Getting unique values for a field
- Implementing custom sorting
- Implementing pagination
- Passing dynamic parameters in a query
Query acceleration
- Accelerating non-additive measures
- Building pre-aggregations for a date range incrementally
- Disabling pre-aggregations
- Using originalSql and rollup pre-aggregations effectively
- Refreshing select partitions of a pre-aggregation