Cube Core version 1.3 is the latest release to date. It includes various improvements to performance, data source support, and a few API endpoints.
This release contains breaking changes. Before upgrading, please familiarize yourself with the following changes and make sure to adjust your data model and configuration if needed:
- Non-strict date range matches in pre-aggregations
- Removal of top-level
includes
andexcludes
in views - New API scope for the
/v1/sql
endpoint - Updates to data source concurrency
- Fixes to
extends
Also, we recommend testing major and minor releases on a staging environment before bringing them to your production environment.
BREAKING: Non-strict date range matches in pre-aggregations
Previously, we've introduced the allow_non_strict_date_range_match
parameter for pre-aggregations to enable them to match queries with date ranges that are not necessarily aligned with the start or the end of pre-aggregation partitions. This is particularly useful when connections Cube to BI tools such as Tableau or Apache Superset because they use such loose date ranges by default.
Now, this is the default behavior for all pre-aggregations, controlled via the CUBEJS_PRE_AGGREGATIONS_ALLOW_NON_STRICT_DATE_RANGE_MATCH
environment variable. You can opt out for all pre-aggregations by using this environment variable or for individual pre-aggregations by using their allow_non_strict_date_range_match
parameter.
We think that the convenience and performance gains of using pre-aggregations to accelerate queries generated by BI tools far outweights a tiny chance of data inaccuracy caused by non-strict date range matching.
BREAKING: Removal of top-level includes
and excludes
in views
Previously, it was possible to define a view using top-level includes
and excludes
parameters, like in the following example. These parameters were deprecated in v0.34.34 and now they are finally removed.
Instead, cubes
and join_path
parameters should be always used so that you can explicitly control join paths.
BREAKING: New API scope for the /v1/sql
endpoint
Previously, the /v1/sql
endpoint of the REST API was part of the data
API scope.
Now, this endpoint is moved to the new sql
API scope, allowing for more granular access control. The sql
scope is included into the list of default API scopes, configurable via the CUBEJS_DEFAULT_API_SCOPES
environment variable. Unless you have explicitly configured that list, this change should not be breaking for you.
Read more about improvements to the /v1/sql
API endpoint below.
IMPORTANT: Updates to data source concurrency
To ensure optimal querying performance, concurrency settings were adjusted for a few popular data sources such as Amazon Athena, Amazon Redshift, ClickHouse, Databricks, and Snowflake.
There's now a new documentation page that explains concurrency and lists concurrency settings for popular data sources. It's recommended to use the default configuration unless you have performed your own testing to ensure that your data source can handle more concurrent queries.
Finally, it's now possible to configure refresh worker concurrency via the specific CUBEJS_REFRESH_WORKER_CONCURRENCY
environment variable.
IMPORTANT: Fixes to extends
Various bugs related to the cube inheritance and the extends
parameter were fixed:
- Joins, pre-aggregations, and access policies are now correctly inherited.
- It is now possible to use the
sql
parameter in a parent cube and thesql_table
parameter in a child cube and vice versa.
In case your data model relied on the faulty behavior when some of cube members were not correctly inherited, you can fall back to it by explicitly redefining inherited members:
Performance optimizations
Query orchestration speed-up with native code
We've implemented a number of performance optimizations, such as deserializing Cube Store result sets in native Rust code, that should have positive impact on query performance. We're rolling these changes out in this release by settings the CUBEJS_TESSERACT_ORCHESTRATOR
environment variable to true
by default.
Compilation speed-up with worker threads
We've improved the data model compilation by moving critical parts of the code to worker threads. You can opt in and enable this optimization by setting the CUBEJS_TRANSPILATION_WORKER_THREADS
environment variable to true
.
If you encounter any issues or see any changes/improvements to your deployments, please report on GitHub.
New in data source support
Various fixes were applied to Amazon Redshift, ClickHouse, Databricks, DuckDB, Dremio, Snowflake drivers. Additionally, these improvements are included:
- Added an option to turn on client compression for ClickHouse.
- Added
databasePath
andmotherDuckToken
configuration options for DuckDB. - Added options to configure StarTree authentication and null handling for Pinot.
- Migrated to the newest backwards-compatible vendor-developed driver for Databricks.
Key-pair authentication for Snowflake
The support for encrypted private keys was added for Snowflake. You can now use the CUBEJS_DB_SNOWFLAKE_PRIVATE_KEY_PASS
environment variable to provide the encryption key.
This is particularly important since Snowflake deprecates single-factor password sign-ins for service users and recommends using key-pair authentication.
GCS export bucket for Databricks
You can now use export buckets on Google Cloud Srorage with Databricks. With this update, Databricks support for export buckets now includes all three major cloud platforms.
New in APIs
Support for rebuilding specific pre-aggregation partitions
The /v1/pre-aggregations/jobs
API endoint allows to trigger pre-aggregation build jobs or retrieve their statuses. It supports targeting pre-aggregations by security contexts, time zones, data sources, cubes, and names.
Now it also supports targeting specific partitions of those pre-aggregations by specifyng a date range that those partitions intersect with by their build range. See the following example utilizing the new dateRange
parameter:
Support for SQL API queries in the /v1/sql
endpoint
The /v1/sql
API endpoint takes an API query and returns the SQL query, generated by Cube, that can be executed against the data source. This is useful for debugging, understanding how Cube translates API queries into SQL queries, and providing transparency to SQL-savvy end users. Previously, only REST API queries were supported.
Now, you can also pass a SQL API query and get the generated query for it, if possible. See the following example utilizing the new format
parameter:
Response:
New in pre-aggregations
The support for specifying a subpath (folder) inside the storage bucket was introduced for the case when MinIO is used with Cube Store. It can be set via the new CUBESTORE_MINIO_SUB_PATH
environment variable. Community members who have tested it report better stability of MinIO in this setup.
New in the documentation
A few highlights to the updates in the documentation:
- New recipe: Implementing custom calendars, e.g., 4-5-4 retail calendar.
- New recipe: Calculating filtered aggregates.
- API references have been moved to the APIs & integrations section. Example: SQL API reference.
Version upgrades
This release also upgrades Node.js, used internally by Cube, to v22. Node.js v20 is now deprecated, and the support for Node.js v18 has been removed.
What's next?
After checking these release notes, please upgrade and give this release a try. You can also do that for free in Cube Cloud.
We can't wait to hear your feedback and thoughts in the Slack community, both about the updates above and the features from the Cube Core public roadmap.
Enjoy the new features and happy Cube-ing!