DEPRECATION.md
This page provides an overview of features that are deprecated in Cube.js. Changes in packaging, and supported (Linux) distributions are not included. To learn about end of support for Linux distributions, refer to the changelog.
As changes are made to Cube.js, there may be times when existing features need to be removed or replaced with newer features. Before an existing feature is removed it is marked as "deprecated" within the documentation and remains in Cube.js for at least one stable release unless specified explicitly otherwise. After that time it may be removed.
Users are expected to take note of the list of deprecated features each release and plan their migration away from those features, and (if applicable) towards the replacement features as soon as possible.
The table below provides an overview of the current status of deprecated features:
Removed in Release: v0.26.0
Node.js 8 reached End of Life on December 31, 2019. This means no more updates. Please upgrade to Node.js 10 or higher.
hearBeatIntervalDeprecated in Release: v0.23.8
This option for @cubejs-client/ws-transport has been
replaced by heartBeatInterval.
CUBEJS_ENABLE_TLSRemoved in Release: v0.26.0
We no longer recommend setting TLS options via Cube.js. Developers should set up TLS on a load balancer or reverse proxy instead. Read more here.
Deprecated in Release: v0.24.0
Embedding Cube.js into Express applications is deprecated due to performance and reliability considerations. Read more about this change here.
Developers are encouraged to migrate to the new cube.js configuration
file and deploy Cube.js as a microservice (or multiple
microservices, if necessary).
@cubejs-backend/query-orchestratorRemoved in Release: v0.32.0
Absolute imports are highly dependent on a path, and all API becomes public. We now provide a public API from the package directly.
Deprecated:
const BaseDriver = require("@cubejs-backend/query-orchestrator/driver/BaseDriver");
You should use:
const { BaseDriver } = require("@cubejs-backend/query-orchestrator");
contextToDataSourceIdRemoved in Release: v0.25.0
The contextToDataSourceId option in the cube.js configuration file has been
replaced by contextToOrchestratorId. Prior to
this change, multi-tenant setups were forced to share a Query Orchestrator
instance. Now orchestrator instances can be shared by Cube.js instances and
across different tenants, if need be. Single-tenant setups should consider
removing the contextToDataSourceId property completely.
@cubejs-backend/server-coreRemoved in Release: v0.32.0
Absolute imports are highly dependent on a path, and all API becomes public. We now provide a public API from the package directly.
Deprecated:
const CubejsServerCore = require("@cubejs-backend/server-core");
You should use:
const { CubejsServerCore } = require("@cubejs-backend/server-core");
@cubejs-backend/schema-compilerRemoved in Release: v0.32.0
Absolute imports are highly dependent on a path, and all API becomes public. We now provide a public API from the package directly.
Deprecated:
const BaseQuery = require("@cubejs-backend/schema-compiler/adapter/BaseQuery");
You should use:
const { BaseQuery } = require("@cubejs-backend/schema-compiler");
checkAuthMiddlewareRemoved in Release: v0.36.0
The checkAuthMiddleware option was tightly bound to Express,
which has been deprecated. Since Cube.js
supports HTTP and WebSockets as transports, we want our authentication API
to not rely on transport-specific details. We now recommend using
checkAuth as a transport-agnostic method of authentication.
This means the same authentication logic can be reused for both HTTP and
WebSockets transports.
If you are using custom authorization, please take a look at the documentation
Removed in Release: v0.29.0
Node.js 10 reached End of Life on April 30, 2021. This means no more updates. Please upgrade to Node.js 12 or higher.
USER_CONTEXTRemoved in Release: v0.36.0
USER_CONTEXT has been renamed to SECURITY_CONTEXT.
You should use:
cube(`visitors`, {
sql: `select * from visitors WHERE ${SECURITY_CONTEXT.source.filter(
"source"
)}`,
});
authInfoDeprecated in Release: v0.26.0
The authInfo parameter to checkAuth no longer wraps the decoded JWT under
the u property. It has also been renamed to
securityContext. Additionally, the security context
claims are now populated from the root payload instead of the u property.
Old shape of authInfo:
{
"sub": "1234567890",
"u": { "user_id": 131 }
}
New shape of authInfo:
{
"sub": "1234567890",
"user_id": 131
}
Deprecated:
const server = new CubejsServer({
checkAuth: async (req, auth) => { // Notice how we're using the `u` property in `jwt.verify()` and assigning the result to `req.authInfo` req.authInfo = jwt.verify({ u: auth }, pem); }, contextToAppId: ({ authInfo }) => `APP_${authInfo.userId}`, preAggregationsSchema: ({ authInfo }) => `pre_aggregations_${authInfo.userId}`,});
You should use:
const server = new CubejsServer({
checkAuth: async (req, auth) => { // We're now using directly assigning the result of `jet.verify()` to the `securityContext` property req.securityContext = jwt.verify(auth, pem); }, // And here we're now using the `securityContext` parameter contextToAppId: ({ securityContext }) => `APP_${securityContext.userId}`, // And the same here preAggregationsSchema: ({ securityContext }) => `pre_aggregations_${securityContext.userId}`,});
CUBEJS_Removed in Release: v0.36.0
Removed in Release: v0.29.0
Removed in Release: v0.32.0
Deprecated in Release: v0.29.0
Cube no longer supports using databases such as MySQL and Postgres as external databases. Please switch to using Cube Store as it is a more robust and reliable solution.
CUBEJS_EXTERNAL_DEFAULT and CUBEJS_SCHEDULED_REFRESH_DEFAULTDeprecated in Release: v0.30.0
The CUBEJS_EXTERNAL_DEFAULT and CUBEJS_SCHEDULED_REFRESH_DEFAULT environment
variables are now marked as deprecated; they were introduced to smooth the
migration to Cube Store and are no longer necessary.
Deprecated in Release: v0.30.0
Using external databases for pre-aggregations is now deprecated, and we strongly recommend using Cube Store as a solution.
dbTypeDeprecated in Release: v0.30.30
Using dbType is now deprecated, and we recommend using
[driverFactory][self-driver-factory] to return a DriverConfig object
instead.
Removed in Release: v0.35.0
Using Serverless deployments with the @cubejs-backend/serverless package is
now deprecated; we strongly recommend using Docker-based deployments
instead.
Removed in Release: v0.35.0
Removed in Release: v0.36.0
Cube Store is now the default cache and queue engine, replacing Redis. Please migrate to Cube Store.
SECURITY_CONTEXTDeprecated in Release: v0.33.0
The SECURITY_CONTEXT context variable is deprecated. Use
query_rewrite
instead.
running_total measure typeDeprecated in Release: v0.33.39
The running_total measure type is now deprecated, and we recommend using
rolling_window
to calculate running totals instead.
includes parameter in viewsRemoved in Release: v1.3.0
The top-level includes parameter is now removed. Please always use the
includes parameter within cubes and join_path
parameters so you can
explicitly control the join path.
Removed in Release: v0.36.0
Removed in release: v0.35.0
Early prototype of the MySQL-based SQL API is removed in favor of the Postgres-compatible
SQL API, together with the
CUBEJS_SQL_PORT environment variable.
initApp hookRemoved in release: v0.35.0
The initApp hook is removed as it's not relevant anymore for Docker-based architecture.
/v1/run-scheduled-refresh REST API endpointRemoved in release: v0.36.0
The /v1/run-scheduled-refresh REST API endpoint is deprecated as it's not
relevant anymore for Docker-based architecture. Use the Orchestration
API and
/v1/pre-aggregations/jobs endpoint instead.
Deprecated in Release: v0.36.0
Node.js 18 reaches End of Life on April 30, 2025. This means no more updates. Please upgrade to Node.js 20 or higher.
CUBEJS_SCHEDULED_REFRESH_CONCURRENCYDeprecated in Release: v1.2.7
This environment variable was renamed to CUBEJS_SCHEDULED_REFRESH_QUERIES_PER_APP_ID. Please use the new name.
Removed in Release: v1.3.0
Deprecated in Release: v1.3.0
Node.js 20 is in maintenance mode from November 22, 2024. This means no more new features, only security updates. Please upgrade to Node.js 22 or higher.
renewQuery parameter of the /v1/load endpointDeprecated in Release: v1.3.73
This parameter is deprecated and will be removed in future releases. See cache control
options and use the new cache parameter of the /v1/load endpoint instead.
Deprecated in Release: v1.6.0
The Elasticsearch driver is deprecated and will be removed in a future release.
context_to_rolesDeprecated in Release: v1.6.4
The context_to_roles configuration option is deprecated and will be removed in a future
release. Please use context_to_groups instead.