1.3.17
DocumentationDocumentationGitHubGitHub (opens in a new tab)ionicons-v5_logos (opens in a new tab)
Try Cube for Free
  • Introduction
  • Getting started
    • Cube Cloud and Snowflake
      • Load data
      • Connect to Snowflake
      • Create data model
      • Query from BI
      • Query from React
    • Cube Cloud and Databricks
      • Load data
      • Connect to Databricks
      • Create data model
      • Query from BI
      • Query from React
    • Cube Core
      • Create a project
      • Query data
      • Add a pre-aggregation
      • Learn more
      • Upload with CLI
      • Import a GitLab repository
      • Import a GitHub repository
      • Import a Git repository
      • Import a Bitbucket repository
  • Configuration
    • Data sources
      • Amazon Athena
      • Amazon Redshift
      • Apache Pinot
      • ClickHouse
      • Databricks
      • Druid
      • DuckDB / MotherDuck
      • Elasticsearch
      • Firebolt
      • Google BigQuery
      • Hive / SparkSQL
      • ksqlDB
      • Materialize
      • Microsoft Fabric
      • Microsoft SQL Server
      • MongoDB
      • MySQL
      • Oracle
      • Postgres
      • Presto
      • QuestDB
      • RisingWave
      • SingleStore
      • Snowflake
      • SQLite
      • Trino
      • Vertica
    • Visualization tools
      • Appsmith
      • Bubble
      • Budibase
      • Deepnote
      • Explo
      • Google Sheets
      • Hashboard
      • Hex
      • Hightouch
      • Jupyter
      • Klipfolio
      • LangChain
      • Looker Studio
      • Metabase
      • Microsoft Excel
      • Microsoft Power BI
      • Observable
      • Push.ai
      • Qlik Sense
      • QuickSight
      • Retool
      • RudderStack
      • Sigma
      • Steep
      • Streamlit
      • Superset / Preset
      • Tableau
      • ThoughtSpot
      • Unity Catalog
    • Multiple data sources
    • Concurrency
    • Multitenancy
      • Environment variables
      • Configuration options
      • Environment variables
      • SSL
      • Data source usage
      • Per-tenant data sources
      • Per-tenant data models
    • Overview
    • Concepts
      • Calculated members
      • Multi-stage calculations
      • Extension
      • Polymorphic cubes
      • Data blending
      • Working with joins
    • Syntax
    • Dynamic data models
      • Dynamic data models with Jinja and Python
      • Dynamic data models with JavaScript
      • Export and import
      • Execution environment (JavaScript models)
      • Cubes
      • Views
      • Measures
      • Dimensions
      • Hierarchies
      • Segments
      • Joins
      • Pre-aggregations
      • Data access policies
      • Types and formats
      • Context variables
      • cube package
      • cube_dbt package
      • lkml2cube package
      • Style guide
      • Designing metrics
      • Averages and percentiles
      • Nested aggregates
      • Filtered aggregates
      • Period-over-period changes
      • Dynamic parameters
      • Dynamic data modeling
      • Dynamic union tables
      • String time dimensions
      • Custom time dimension granularities
      • Custom calendars
      • EAV model
      • Data snapshots
      • Active users
      • Event analytics
      • Funnel analysis
      • Retention analysis
      • Rate of return
      • Using Cube with dbt
  • Caching
    • Getting started with pre-aggregations
    • Using pre-aggregations
    • Matching pre-aggregations
    • Refreshing pre-aggregations
    • Lambda pre-aggregations
    • Running in production
      • Non-additive measures
      • Incremental pre-aggregations
      • Disabling pre-aggregations
      • Using original_sql and rollup pre-aggregations effectively
      • Refreshing select partitions
      • Joining data from multiple data sources
  • Access control
    • Authentication
      • Name and password
      • Kerberos
      • NTLM
      • Identity provider
      • JSON Web Token
    • Security context
    • Member-level security
    • Row-level security
    • Data access policies
      • Mandatory filters
      • Column-based access
      • Role-based access
      • Access to cubes/views
      • SQL API and LDAP
      • REST API and Auth0
      • REST API and AWS Cognito
  • APIs & integrations
    • Queries
    • DAX API
      • Reference
    • MDX API
    • Cube Cloud for Excel
    • Cube Cloud for Sheets
    • Semantic Layer Sync
      • Apache Superset
      • Metabase
      • Preset
      • Tableau
    • SQL API
      • Query format
      • Joins
      • Authentication and Authorization
      • Reference
    • REST API
      • Query format
      • Real-Time data fetch
      • Reference
    • GraphQL API
      • Reference
    • JavaScript SDK
      • React
      • Vue
      • Angular
        • core
        • react
        • ngx
        • vue
        • ws-transport
    • Orchestration API
      • Airflow
      • Dagster
      • Prefect
      • Unique values
      • Numeric values
      • Custom sorting
      • Pagination
      • Drilldowns
  • Workspace
    • Playground
    • Chart Prototyping
    • Data Model
    • Visual Model
    • Saved Reports
    • Rollup Designer
    • Development mode
    • Environments
    • Integrations
    • SQL Runner
    • Query History
    • Pre-aggregations
    • Performance Insights
    • Monitoring Integrations
      • Amazon CloudWatch
      • Amazon S3
      • Datadog
      • Grafana Cloud
      • New Relic
    • Access Control
    • Authentication & SSO
      • Google Workspace
      • Microsoft Entra ID
      • Okta
    • Audit Log
    • Encryption keys
    • Budgets
    • Preferences
    • CLI
      • Reference
    • Semantic Catalog
      • Exporting Query History
  • Deployment
    • Production checklist
    • Cube Cloud
      • Cloud providers
        • AWS
        • GCP
        • Azure
      • Infrastructure options
      • VPC
        • AWS
          • PrivateLink
          • VPC Peering
        • GCP
        • Azure
      • BYOC
        • AWS
        • Azure
      • Deployments
      • Deployment types
      • Continuous deployment
      • Custom domains
      • Deployment warm-up
      • Auto-suspension
      • Scalability
      • Pricing
      • Support
      • Limits
    • Cube Core
  • Distribution
    • Introduction
    • Getting started
      • Cube Cloud and Snowflake
        • Load data
        • Connect to Snowflake
        • Create data model
        • Query from BI
        • Query from React
      • Cube Cloud and Databricks
        • Load data
        • Connect to Databricks
        • Create data model
        • Query from BI
        • Query from React
      • Cube Core
        • Create a project
        • Query data
        • Add a pre-aggregation
        • Learn more
        • Upload with CLI
        • Import a GitLab repository
        • Import a GitHub repository
        • Import a Git repository
        • Import a Bitbucket repository
    • Configuration
      • Data sources
        • Amazon Athena
        • Amazon Redshift
        • Apache Pinot
        • ClickHouse
        • Databricks
        • Druid
        • DuckDB / MotherDuck
        • Elasticsearch
        • Firebolt
        • Google BigQuery
        • Hive / SparkSQL
        • ksqlDB
        • Materialize
        • Microsoft Fabric
        • Microsoft SQL Server
        • MongoDB
        • MySQL
        • Oracle
        • Postgres
        • Presto
        • QuestDB
        • RisingWave
        • SingleStore
        • Snowflake
        • SQLite
        • Trino
        • Vertica
      • Visualization tools
        • Appsmith
        • Bubble
        • Budibase
        • Deepnote
        • Explo
        • Google Sheets
        • Hashboard
        • Hex
        • Hightouch
        • Jupyter
        • Klipfolio
        • LangChain
        • Looker Studio
        • Metabase
        • Microsoft Excel
        • Microsoft Power BI
        • Observable
        • Push.ai
        • Qlik Sense
        • QuickSight
        • Retool
        • RudderStack
        • Sigma
        • Steep
        • Streamlit
        • Superset / Preset
        • Tableau
        • ThoughtSpot
        • Unity Catalog
      • Multiple data sources
      • Concurrency
      • Multitenancy
        • Environment variables
        • Configuration options
        • Environment variables
        • SSL
        • Data source usage
        • Per-tenant data sources
        • Per-tenant data models
      • Overview
      • Concepts
        • Calculated members
        • Multi-stage calculations
        • Extension
        • Polymorphic cubes
        • Data blending
        • Working with joins
      • Syntax
      • Dynamic data models
        • Dynamic data models with Jinja and Python
        • Dynamic data models with JavaScript
        • Export and import
        • Execution environment (JavaScript models)
        • Cubes
        • Views
        • Measures
        • Dimensions
        • Hierarchies
        • Segments
        • Joins
        • Pre-aggregations
        • Data access policies
        • Types and formats
        • Context variables
        • cube package
        • cube_dbt package
        • lkml2cube package
        • Style guide
        • Designing metrics
        • Averages and percentiles
        • Nested aggregates
        • Filtered aggregates
        • Period-over-period changes
        • Dynamic parameters
        • Dynamic data modeling
        • Dynamic union tables
        • String time dimensions
        • Custom time dimension granularities
        • Custom calendars
        • EAV model
        • Data snapshots
        • Active users
        • Event analytics
        • Funnel analysis
        • Retention analysis
        • Rate of return
        • Using Cube with dbt
    • Caching
      • Getting started with pre-aggregations
      • Using pre-aggregations
      • Matching pre-aggregations
      • Refreshing pre-aggregations
      • Lambda pre-aggregations
      • Running in production
        • Non-additive measures
        • Incremental pre-aggregations
        • Disabling pre-aggregations
        • Using original_sql and rollup pre-aggregations effectively
        • Refreshing select partitions
        • Joining data from multiple data sources
    • Access control
      • Authentication
        • Name and password
        • Kerberos
        • NTLM
        • Identity provider
        • JSON Web Token
      • Security context
      • Member-level security
      • Row-level security
      • Data access policies
        • Mandatory filters
        • Column-based access
        • Role-based access
        • Access to cubes/views
        • SQL API and LDAP
        • REST API and Auth0
        • REST API and AWS Cognito
    • APIs & integrations
      • Queries
      • DAX API
        • Reference
      • MDX API
      • Cube Cloud for Excel
      • Cube Cloud for Sheets
      • Semantic Layer Sync
        • Apache Superset
        • Metabase
        • Preset
        • Tableau
      • SQL API
        • Query format
        • Joins
        • Authentication and Authorization
        • Reference
      • REST API
        • Query format
        • Real-Time data fetch
        • Reference
      • GraphQL API
        • Reference
      • JavaScript SDK
        • React
        • Vue
        • Angular
          • core
          • react
          • ngx
          • vue
          • ws-transport
      • Orchestration API
        • Airflow
        • Dagster
        • Prefect
        • Unique values
        • Numeric values
        • Custom sorting
        • Pagination
        • Drilldowns
    • Workspace
      • Playground
      • Chart Prototyping
      • Data Model
      • Visual Model
      • Saved Reports
      • Rollup Designer
      • Development mode
      • Environments
      • Integrations
      • SQL Runner
      • Query History
      • Pre-aggregations
      • Performance Insights
      • Monitoring Integrations
        • Amazon CloudWatch
        • Amazon S3
        • Datadog
        • Grafana Cloud
        • New Relic
      • Access Control
      • Authentication & SSO
        • Google Workspace
        • Microsoft Entra ID
        • Okta
      • Audit Log
      • Encryption keys
      • Budgets
      • Preferences
      • CLI
        • Reference
      • Semantic Catalog
        • Exporting Query History
    • Deployment
      • Production checklist
      • Cube Cloud
        • Cloud providers
          • AWS
          • GCP
          • Azure
        • Infrastructure options
        • VPC
          • AWS
            • PrivateLink
            • VPC Peering
          • GCP
          • Azure
        • BYOC
          • AWS
          • Azure
        • Deployments
        • Deployment types
        • Continuous deployment
        • Custom domains
        • Deployment warm-up
        • Auto-suspension
        • Scalability
        • Pricing
        • Support
        • Limits
      • Cube Core
    • Distribution
Question? Give us feedback → (opens in a new tab)Edit this page

Documentation
Data modeling
Dynamic data models

Dynamic data models

Jinja & PythonJinja & Python
JavaScriptJavaScript
SyntaxDynamic data models with Jinja and Python
© 2025 Cube Dev, Inc.
ResourcesDocsBlogCommunityEventsCustomer StoriesCube Partner Network
CompanyAboutCareersTerms of UsePrivacy PolicySecurity StatementList of Subprocessors
Channels
Cube Cloud Status