Reference
Configuration
Environment variables

Environment variables

To see a complete list of environment variables for a specific data source, please check the relevant page on Connecting to Data Sources.

CUBEJS_API_SECRET

The secret key used to sign and verify JWTs. Generated on project scaffold with npx cubejs-cli create.

Possible ValuesDefault in DevelopmentDefault in Production
A valid stringN/AN/A

See also the check_auth configuration option.

CUBEJS_APP

An application ID used to uniquely identify the Cube deployment. Can be different for multitenant setups.

Possible ValuesDefault in DevelopmentDefault in Production
A valid stringcubejscubejs

CUBEJS_AWS_KEY

The AWS Access Key ID to use for database connections.

Possible ValuesDefault in DevelopmentDefault in Production
A valid AWS Access Key IDN/AN/A

CUBEJS_AWS_SECRET

The AWS Secret Access Key to use for database connections.

Possible ValuesDefault in DevelopmentDefault in Production
A valid AWS Secret Access KeyN/AN/A

CUBEJS_AWS_REGION

The AWS region to use for database connections.

Possible ValuesDefault in DevelopmentDefault in Production
A valid AWS region (opens in a new tab)N/AN/A

CUBEJS_AWS_S3_OUTPUT_LOCATION

The S3 path to store AWS Athena (opens in a new tab) query results made by Cube.

Possible ValuesDefault in DevelopmentDefault in Production
A valid S3 pathN/AN/A

CUBEJS_AWS_ATHENA_WORKGROUP

The name of the AWS Athena workgroup (opens in a new tab) in which the query is being started.

Possible ValuesDefault in DevelopmentDefault in Production
A valid Athena Workgroup (opens in a new tab)N/AN/A

CUBEJS_AWS_ATHENA_CATALOG

The name of the AWS Athena catalog to use for queries.

Possible ValuesDefault in DevelopmentDefault in Production
A valid Athena Catalog name (opens in a new tab)N/AN/A

CUBEJS_DB_SCHEMA

The name of the schema to use as information_schema filter. Reduces count of tables loaded during data model generation.

Possible ValuesDefault in DevelopmentDefault in Production
A valid schema nameN/AN/A

CUBEJS_CACHE_AND_QUEUE_DRIVER

The cache and queue driver to use for the Cube deployment.

Possible ValuesDefault in DevelopmentDefault in Production
cubestore, memorymemorycubestore

It can be also set using the cache_and_queue_driver configuration option.

CUBEJS_CONCURRENCY

The number of concurrent connections each query queue has to the database.

Possible ValuesDefault in DevelopmentDefault in Production
A valid numberSee database-specific pageSee database-specific page

It can be also set as concurrency in the orchestrator_options configuration option.

CUBEJS_CUBESTORE_HOST

The hostname of the Cube Store deployment

Possible ValuesDefault in DevelopmentDefault in Production
A valid hostnamelocalhostN/A

CUBEJS_CUBESTORE_PORT

The port of the Cube Store deployment.

Possible ValuesDefault in DevelopmentDefault in Production
A valid port number30303030

CUBEJS_DATASOURCES

A comma-separated list of data source names. Data sources defined here can be used to decorate CUBEJS_DB_* environment variables.

Possible ValuesDefault in DevelopmentDefault in Production
A comma-separated list of stringsN/AN/A
CUBEJS_DATASOURCES=default,datasource1

CUBEJS_DB_BQ_CREDENTIALS

A Base64 encoded JSON key file for connecting to Google BigQuery.

Possible ValuesDefault in DevelopmentDefault in Production
A valid Google BigQuery JSON key file encoded as a Base64 stringN/AN/A

CUBEJS_DB_BQ_KEY_FILE

The path to a JSON key file for connecting to Google BigQuery.

Possible ValuesDefault in DevelopmentDefault in Production
A valid Google BigQuery JSON key fileN/AN/A

CUBEJS_DB_BQ_LOCATION

The Google BigQuery dataset location to connect to. Required if used with pre-aggregations outside of US. If not set then BQ driver will fail with Dataset was not found in location US error.

Possible ValuesDefault in DevelopmentDefault in Production
A valid Google BigQuery regional location (opens in a new tab)N/AN/A

CUBEJS_DB_BQ_PROJECT_ID

The Google BigQuery project ID to connect to.

Possible ValuesDefault in DevelopmentDefault in Production
A valid Google BigQuery Project IDN/AN/A

CUBEJS_DB_CLICKHOUSE_READONLY

Whether the ClickHouse user has read-only access or not.

Possible ValuesDefault in DevelopmentDefault in Production
true, falseN/AN/A

CUBEJS_DB_DATABRICKS_ACCEPT_POLICY

To accept the license terms for the Databricks JDBC driver, this must be set to true.

Possible ValuesDefault in DevelopmentDefault in Production
true, falseN/AN/A

CUBEJS_DB_DATABRICKS_CATALOG

The name of the Databricks catalog (opens in a new tab) to connect to.

Possible ValuesDefault in DevelopmentDefault in Production
A valid Databricks catalog nameN/AN/A

CUBEJS_DB_DATABRICKS_TOKEN

The personal access token (opens in a new tab) used to authenticate the Databricks connection.

Possible ValuesDefault in DevelopmentDefault in Production
A valid Databricks access tokenN/AN/A

CUBEJS_DB_DATABRICKS_URL

The URL for a JDBC connection.

Possible ValuesDefault in DevelopmentDefault in Production
A valid JDBC URLN/AN/A

CUBEJS_DB_DOMAIN

A domain name within an MS SQL database to connect to.

Possible ValuesDefault in DevelopmentDefault in Production
A valid domain name within a MS SQL databaseN/AN/A

CUBEJS_DB_DUCKDB_MEMORY_LIMIT

The maximum memory limit (opens in a new tab) for DuckDB. Equivalent to SET memory_limit=<MEMORY_LIMIT>.

Possible ValuesDefault in DevelopmentDefault in Production
A valid MotherDuck service token75% of available RAM75% of available RAM

CUBEJS_DB_DUCKDB_SCHEMA

The default search schema (opens in a new tab) for DuckDB.

Possible ValuesDefault in DevelopmentDefault in Production
A valid schema namemainmain

CUBEJS_DB_DUCKDB_MOTHERDUCK_TOKEN

The service token (opens in a new tab) to use for connections to MotherDuck.

Possible ValuesDefault in DevelopmentDefault in Production
A valid MotherDuck service tokenN/AN/A

CUBEJS_DB_DUCKDB_DATABASE_PATH

The database filepath to use for connection to a local database.

Possible ValuesDefault in DevelopmentDefault in Production
A valid duckdb database file pathN/AN/A

CUBEJS_DB_DUCKDB_S3_ACCESS_KEY_ID

The AWS Access Key ID to use for S3 connections.

Possible ValuesDefault in DevelopmentDefault in Production
A valid AWS Access Key IDN/AN/A

CUBEJS_DB_DUCKDB_S3_SECRET_ACCESS_KEY

The AWS Secret Access Key to use for S3 connections.

Possible ValuesDefault in DevelopmentDefault in Production
A valid AWS Secret Access KeyN/AN/A

CUBEJS_DB_DUCKDB_S3_ENDPOINT

The AWS endpoint to use for S3 connections.

Possible ValuesDefault in DevelopmentDefault in Production
A valid AWS S3 endpoint (opens in a new tab)N/AN/A

CUBEJS_DB_DUCKDB_S3_REGION

The AWS region to use for S3 connections.

Possible ValuesDefault in DevelopmentDefault in Production
A valid AWS region (opens in a new tab)N/AN/A

CUBEJS_DB_DUCKDB_S3_USE_SSL

Use SSL when connecting to S3.

Possible ValuesDefault in DevelopmentDefault in Production
True or falseN/AN/A

CUBEJS_DB_DUCKDB_S3_URL_STYLE

The URL style to be used by S3.

Possible ValuesDefault in DevelopmentDefault in Production
[vhost/path]N/AN/A

CUBEJS_DB_DUCKDB_S3_SESSION_TOKEN

The S3 session token.

Possible ValuesDefault in DevelopmentDefault in Production
A valid S3 session tokenN/AN/A

CUBEJS_DB_DUCKDB_EXTENSIONS

A comma-separated list of DuckDB extensions to install and load.

Possible ValuesDefault in DevelopmentDefault in Production
A comma-separated list of DuckDB extensionsN/AN/A

CUBEJS_DB_ELASTIC_APIKEY_ID

The ID of the API key from elastic.co (opens in a new tab). Required when using Elastic Cloud.

Possible ValuesDefault in DevelopmentDefault in Production
A valid Elastic.co API key IDN/AN/A

CUBEJS_DB_ELASTIC_APIKEY_KEY

The API key from elastic.co (opens in a new tab). Required when using Elastic Cloud.

Possible ValuesDefault in DevelopmentDefault in Production
A valid Elastic.co API keyN/AN/A

CUBEJS_DB_ELASTIC_OPENDISTRO

If true, then use the Open Distro for Elasticsearch.

Possible ValuesDefault in DevelopmentDefault in Production
true, falseN/AN/A

CUBEJS_DB_ELASTIC_QUERY_FORMAT

By default, queries return data in JDBC format, but you can also return data in standard Elasticsearch JDBC, JSON, CSV, YAML or raw formats (only JSON and JDBC are currently supported).

Possible ValuesDefault in DevelopmentDefault in Production
json, jdbcN/AN/A

CUBEJS_DB_EXPORT_BUCKET

The name of a bucket in cloud storage to store the database export snapshots.

When using multiple data sources, this environment variable can be decorated with a data source.

Possible ValuesDefault in DevelopmentDefault in Production
A valid bucket in the configured cloud storageN/AN/A
CUBEJS_DB_EXPORT_BUCKET=exports-20210505

# Decorated with a data source named `datasource1`
CUBEJS_DS_DATASOURCE1_DB_EXPORT_BUCKET=exports-20210505

CUBEJS_DB_EXPORT_BUCKET_TYPE

The cloud provider where the bucket is hosted.

When using multiple data sources, this environment variable can be decorated with a data source.

Possible ValuesDefault in DevelopmentDefault in Production
gcp, s3N/AN/A
CUBEJS_DB_EXPORT_BUCKET_TYPE=gcp

# Decorated with a data source named `datasource1`
CUBEJS_DS_DATASOURCE1_DB_EXPORT_BUCKET_TYPE=gcp

CUBEJS_DB_EXPORT_BUCKET_AWS_KEY

The AWS Access Key ID to use for the export bucket.

When using multiple data sources, this environment variable can be decorated with a data source.

Possible ValuesDefault in DevelopmentDefault in Production
A valid AWS Access Key IDN/AN/A

CUBEJS_DB_EXPORT_BUCKET_AWS_SECRET

The AWS Secret Access Key to use for the export bucket.

When using multiple data sources, this environment variable can be decorated with a data source.

Possible ValuesDefault in DevelopmentDefault in Production
A valid AWS Secret Access KeyN/AN/A

CUBEJS_DB_EXPORT_BUCKET_AWS_REGION

The AWS region of the export bucket.

When using multiple data sources, this environment variable can be decorated with a data source.

Possible ValuesDefault in DevelopmentDefault in Production
A valid AWS region (opens in a new tab)N/AN/A

CUBEJS_DB_EXPORT_BUCKET_MOUNT_DIR

The mount path to use for a Databricks DBFS mount (opens in a new tab).

Possible ValuesDefault in DevelopmentDefault in Production
A valid mount pathN/AN/A

CUBEJS_DB_EXPORT_BUCKET_REDSHIFT_ARN

An ARN of an AWS IAM role with permission to write to the configured bucket (see CUBEJS_DB_EXPORT_BUCKET).

When using multiple data sources, this environment variable can be decorated with a data source.

Possible ValuesDefault in DevelopmentDefault in Production
A valid ARN to an IAM Role associated with the target Redshift data sourceN/AN/A

CUBEJS_DB_EXPORT_GCS_CREDENTIALS

A Base64 encoded JSON key file for connecting to Google Cloud.

When using multiple data sources, this environment variable can be decorated with a data source.

Possible ValuesDefault in DevelopmentDefault in Production
A valid Google Cloud JSON key file encoded as a Base64 stringN/AN/A

CUBEJS_DB_EXPORT_INTEGRATION

The name of the integration used in the database. Only required when using Snowflake and Google Cloud Storage.

When using multiple data sources, this environment variable can be decorated with a data source.

Possible ValuesDefault in DevelopmentDefault in Production
A valid string matching the name of the integration in SnowflakeN/AN/A

CUBEJS_DB_HOST

The host URL for a database.

Possible ValuesDefault in DevelopmentDefault in Production
A valid database host URLN/AN/A

CUBEJS_DB_SOCKET_PATH

The path to a Unix socket that is used to connect to a data source, e.g., MySQL.

Possible ValuesDefault in DevelopmentDefault in Production
A valid path to a socketN/AN/A

CUBEJS_DB_MAX_POOL

The maximum number of concurrent database connections to pool.

Possible ValuesDefault in DevelopmentDefault in Production
A valid numberSee database-specific pageSee database-specific page

CUBEJS_DB_NAME

The name of the database to connect to.

Possible ValuesDefault in DevelopmentDefault in Production
A valid database nameN/AN/A

CUBEJS_DB_PASS

The password used to connect to the database.

Possible ValuesDefault in DevelopmentDefault in Production
A valid database passwordN/AN/A

CUBEJS_DB_PORT

The port for the database connection.

Possible ValuesDefault in DevelopmentDefault in Production
A valid port numberN/AN/A

CUBEJS_DB_PRESTO_CATALOG

The catalog within Presto/Trino to connect to.

Possible ValuesDefault in DevelopmentDefault in Production
A valid catalog name within a Presto/Trino databaseN/AN/A

CUBEJS_DB_QUERY_TIMEOUT

The timeout value for any queries made to the database by Cube.

Possible ValuesDefault in DevelopmentDefault in Production
A number in seconds or a duration string10m10m

There's a hard limit of 20 minutes for queries that ingest data into Cube Store when pre-aggregations are built. If you bump into this limit, consider using an export bucket and splitting pre-aggregations into partitions.

CUBEJS_DB_FETCH_COLUMNS_BY_ORDINAL_POSITION

Force fetching of columns by ordinal positions. Certain data-providers (e.g., Redshift) do not guarantee columns in the same order on each request (e.g., SELECT * FROM foo). This flag ensures that columns will be fetched in proper order for pre-aggregation generation.

Possible ValuesDefault in DevelopmentDefault in Production
Whether to force fetch columns in ordinal positiontruetrue

CUBEJS_DB_MATERIALIZE_CLUSTER

The cluster name to use when connecting to Materialize.

Possible ValuesDefault in DevelopmentDefault in Production
A valid Materialize cluster nameN/AN/A

CUBEJS_DB_SNOWFLAKE_ACCOUNT

The Snowflake account identifier to use when connecting to the database.

Possible ValuesDefault in DevelopmentDefault in Production
A valid Snowflake account ID (opens in a new tab)N/AN/A

CUBEJS_DB_SNOWFLAKE_AUTHENTICATOR

The type of authenticator to use with Snowflake. Use SNOWFLAKE with username/password, or SNOWFLAKE_JWT with key pairs.

Possible ValuesDefault in DevelopmentDefault in Production
SNOWFLAKE, SNOWFLAKE_JWTSNOWFLAKESNOWFLAKE

CUBEJS_DB_SNOWFLAKE_CLIENT_SESSION_KEEP_ALIVE

If true, keep the Snowflake connection alive indefinitely (opens in a new tab).

Possible ValuesDefault in DevelopmentDefault in Production
true, falsetruetrue

CUBEJS_DB_SNOWFLAKE_PRIVATE_KEY_PASS

The password for the private RSA key. Only required for encrypted keys.

Possible ValuesDefault in DevelopmentDefault in Production
A valid password for the encrypted private RSA keyN/AN/A

CUBEJS_DB_SNOWFLAKE_PRIVATE_KEY_PATH

The path to the private RSA key folder.

Possible ValuesDefault in DevelopmentDefault in Production
A valid path to the private RSA keyN/AN/A

CUBEJS_DB_SNOWFLAKE_REGION

The Snowflake region to use when connecting to the database.

Possible ValuesDefault in DevelopmentDefault in Production
A valid Snowflake region (opens in a new tab)N/AN/A

CUBEJS_DB_SNOWFLAKE_ROLE

The Snowflake role to use when connecting to the database.

Possible ValuesDefault in DevelopmentDefault in Production
A valid Snowflake role (opens in a new tab) in the accountN/AN/A

CUBEJS_DB_SNOWFLAKE_WAREHOUSE

The Snowflake warehouse to use when connecting to the database.

Possible ValuesDefault in DevelopmentDefault in Production
A valid Snowflake warehouse (opens in a new tab) in the accountN/AN/A

CUBEJS_DB_SSL

If true, enables SSL encryption for database connections from Cube.

Possible ValuesDefault in DevelopmentDefault in Production
true, falseN/AN/A

CUBEJS_DB_TYPE

A database from the list of supported databases.

Possible ValuesDefault in DevelopmentDefault in Production
Any valid database supported by CubeN/AN/A

CUBEJS_DB_URL

The URL for a database.

Possible ValuesDefault in DevelopmentDefault in Production
A valid database URLN/AN/A

CUBEJS_DB_USER

The username used to connect to the database.

Possible ValuesDefault in DevelopmentDefault in Production
A valid database usernameN/AN/A

CUBEJS_DB_QUERY_DEFAULT_LIMIT

The default row limit in the result set if it's not explicitly specified in an API query.

Possible ValuesDefault in DevelopmentDefault in Production
A positive integer number1000010000

CUBEJS_DB_QUERY_LIMIT

The maximum row limit in the result set.

Possible ValuesDefault in DevelopmentDefault in Production
A positive integer number5000050000

Increasing the maximum row limit may cause out-of-memory (OOM) crashes and make Cube susceptible to denial-of-service (DoS) attacks if it's exposed to untrusted environments.

CUBEJS_DEFAULT_API_SCOPES

API scopes used to allow or disallow access to REST API endpoints.

Possible ValuesDefault in DevelopmentDefault in Production
A comma-delimited string with any combination of API scopesmeta,data,graphqlmeta,data,graphql

See also the context_to_api_scopes configuration option.

CUBEJS_DEV_MODE

If true, enables development mode.

Possible ValuesDefault in DevelopmentDefault in Production
true, falsetruefalse

CUBEJS_DROP_PRE_AGG_WITHOUT_TOUCH

If true, it enables dropping pre-aggregations that Refresh Worker doesn't touch within CUBEJS_TOUCH_PRE_AGG_TIMEOUT. Pre-aggregations are touched whenever they are rebuilt or a Refresh Worker checks its freshness. The first drop will be initiated when the Refresh Worker is able to check freshness for every scheduledRefresh: true pre-aggregation. If you have multiple Refresh Workers with different data model versions sharing the same Cube Store cluster, then touches from both refresh workers are respected.

Possible ValuesDefault in DevelopmentDefault in Production
true, falsetruetrue

CUBEJS_FIREBOLT_ACCOUNT

The Firebolt account name (opens in a new tab).

Possible ValuesDefault in DevelopmentDefault in Production
A valid Firebolt account name (opens in a new tab)N/AN/A

CUBEJS_FIREBOLT_API_ENDPOINT

The Firebolt API endpoint. Used for authentication.

Possible ValuesDefault in DevelopmentDefault in Production
api.dev.firebolt.io, api.staging.firebolt.io, api.app.firebolt.ioN/AN/A

CUBEJS_FIREBOLT_ENGINE_NAME

The name of the Firebolt engine (opens in a new tab) to connect to.

Possible ValuesDefault in DevelopmentDefault in Production
A valid Firebolt engine name (opens in a new tab)N/AN/A

CUBEJS_GH_API_TOKEN

A GitHub Personal Access Token (opens in a new tab) to avoid API rate limiting when downloading Cube Store.

Possible ValuesDefault in DevelopmentDefault in Production
A valid GitHub PATfalsefalse

CUBEJS_JWK_URL

Enables JSON Web Key (JWK) (opens in a new tab)-based authentication in Cube.

Possible ValuesDefault in DevelopmentDefault in Production
A valid URL to a JSON Web Key SetN/AN/A

It can be also set as jwkUrl in the jwt configuration option.

CUBEJS_JWT_ALGS

Any supported algorithm for decoding JWTs (opens in a new tab).

Possible ValuesDefault in DevelopmentDefault in Production
HS256, RS256N/AN/A

It can be also set as algorithms in the jwt configuration option.

CUBEJS_JWT_AUDIENCE

An audience value which will be used to enforce the aud claim from inbound JWTs (opens in a new tab).

Possible ValuesDefault in DevelopmentDefault in Production
A valid aud claimN/AN/A

It can be also set as audience in the jwt configuration option.

CUBEJS_JWT_CLAIMS_NAMESPACE

A namespace within the decoded JWT under which any custom claims can be found.

Possible ValuesDefault in DevelopmentDefault in Production
A valid stringN/AN/A

It can be also set as claimsNamespace in the jwt configuration option.

CUBEJS_JWT_ISSUER

An issuer value which will be used to enforce the iss claim from inbound JWTs (opens in a new tab).

Possible ValuesDefault in DevelopmentDefault in Production
A valid iss claimN/AN/A

It can be also set as issuer in the jwt configuration option.

CUBEJS_JWT_KEY

The secret key used to sign and verify JWTs. Similar to CUBEJS_API_SECRET.

Possible ValuesDefault in DevelopmentDefault in Production
A valid stringN/AN/A

It can be also set as key in the jwt configuration option.

CUBEJS_JWT_SUBJECT

A subject value which will be used to enforce the sub claim from inbound JWTs (opens in a new tab).

Possible ValuesDefault in DevelopmentDefault in Production
A valid sub claimN/AN/A

It can be also set as subject in the jwt configuration option.

CUBEJS_LOG_LEVEL

The logging level for Cube.

Possible ValuesDefault in DevelopmentDefault in Production
error, info, trace, warnwarnwarn

See also CUBESTORE_LOG_LEVEL. See also the logger configuration option.

CUBEJS_MAX_PARTITIONS_PER_CUBE

The maximum number of partitions each pre-aggregation in a cube can use.

Possible ValuesDefault in DevelopmentDefault in Production
A valid number1000010000

CUBEJS_PG_SQL_PORT

The port used by the SQL API to listen to Postgres-compatible connections on.

Possible ValuesDefault in DevelopmentDefault in Production
A valid port numberN/AN/A

CUBEJS_PRE_AGGREGATIONS_BUILDER

If true, this instance of Cube will build pre-aggregations, even if it is an API instance.

Possible ValuesDefault in DevelopmentDefault in Production
true, falsetruefalse *

Notes

If Cube is configured to act as a refresh worker instance using CUBEJS_REFRESH_WORKER, then CUBEJS_PRE_AGGREGATIONS_BUILDER will be true.

CUBEJS_PRE_AGGREGATIONS_SCHEMA

The database schema name to use for storing pre-aggregations.

Possible ValuesDefault in DevelopmentDefault in Production
A valid stringdev_pre_aggregationsprod_pre_aggregations

It can be also set using the pre_aggregations_schema configuration option.

CUBEJS_REFRESH_WORKER

If true, this instance of Cube will only refresh pre-aggregations.

Possible ValuesDefault in DevelopmentDefault in Production
true, falsefalsefalse

CUBEJS_ROLLUP_ONLY

If true, the API instance of Cube will only fulfill queries from pre-aggregations. See rollup-only mode for details.

Possible ValuesDefault in DevelopmentDefault in Production
true, falsefalsefalse

It can be also set using the orchestrator_options.rollupOnlyMode configuration option.

CUBEJS_SCHEDULED_REFRESH_CONCURRENCY

How many pre-aggregations refresh worker will build in parallel. Please note changing this param doesn't change queue concurrency and it should be adjusted accordingly

Possible ValuesDefault in DevelopmentDefault in Production
A valid number of concurrent refresh processes1010

CUBEJS_SCHEDULED_REFRESH_TIMEZONES

A comma-separated list of timezones to schedule refreshes for.

Possible ValuesDefault in DevelopmentDefault in Production
A valid timezone from the tz database (opens in a new tab)N/AN/A

It can be also set using the scheduled_refresh_time_zones configuration option.

CUBEJS_SCHEMA_PATH

The path where Cube loads data models from.

Possible ValuesDefault in DevelopmentDefault in Production
A valid path containing Cube data modelsmodelmodel

Until v0.35, the default value was schema.

It can be also set using the schema_path configuration option.

CUBEJS_SQL_USER

A username required to access the SQL API.

Possible ValuesDefault in DevelopmentDefault in Production
A valid stringN/AN/A

See also the check_sql_auth configuration option.

CUBEJS_SQL_PASSWORD

A password required to access the SQL API.

Possible ValuesDefault in DevelopmentDefault in Production
A valid stringN/AN/A

See also the check_sql_auth configuration option.

CUBEJS_SQL_SUPER_USER

A name of specific user who will be allowed to change the user during the SQL API session.

Possible ValuesDefault in DevelopmentDefault in Production
A valid stringN/AN/A

See also the can_switch_sql_user configuration option.

CUBEJS_ALLOW_UNGROUPED_WITHOUT_PRIMARY_KEY

If true, disables the primary key inclusion check for ungrouped queries.

Possible ValuesDefault in DevelopmentDefault in Production
true, falsefalsefalse

It can be also set using the allow_ungrouped_without_primary_key configuration option.

When query push-own in the SQL API is enabled via the CUBESQL_SQL_PUSH_DOWN environment variable, this option is enabled as well for the best user experience.

CUBESQL_SQL_PUSH_DOWN

If true, enables query pushdown in the SQL API.

Possible ValuesDefault in DevelopmentDefault in Production
true, falsetruetrue

Query pushdown in the SQL API is available in public preview. Read more (opens in a new tab) in the blog.

CUBESQL_STREAM_MODE

If true, enables the streaming mode in the SQL API.

Possible ValuesDefault in DevelopmentDefault in Production
true, falsefalsefalse

CUBESQL_SQL_NO_IMPLICIT_ORDER

If true, prevents adding implicit default ORDER BY clause for SQL API queries.

Possible ValuesDefault in DevelopmentDefault in Production
true, falsetruetrue

CUBEJS_MAX_SESSIONS

Specifies the maximum number of concurrent sessions (connections) to the SQL API and safeguards your Cube deployment from out-of-memory crashes when too many connections are attempted to be established.

Possible ValuesDefault in DevelopmentDefault in Production
A valid number10241024

CUBESQL_REWRITE_MAX_NODES

Specifies the maximum number of e-graph nodes that are allocated during the creation of a query plan in the SQL API.

Should be increased if you get the following error: Error during rewrite: Can't find rewrite due to 10002 AST node limit reached.

Possible ValuesDefault in DevelopmentDefault in Production
A valid number1000010000

CUBESQL_REWRITE_MAX_ITERATIONS

Specifies the maximum number of e-graph term rewriting iterations that are performed during the creation of a query plan in the SQL API.

Possible ValuesDefault in DevelopmentDefault in Production
A valid number300300

CUBESQL_REWRITE_TIMEOUT

Specifies the maximum time, in seconds, that is allocated for the creation of a query plan in the SQL API.

Possible ValuesDefault in DevelopmentDefault in Production
A valid number3030

CUBESQL_AUTH_EXPIRE_SECS

Number of seconds before session's SQL API security context will be invalidated.

Possible ValuesDefault in DevelopmentDefault in Production
A valid integer number300300

CUBEJS_TELEMETRY

If true, then send telemetry to Cube.

Possible ValuesDefault in DevelopmentDefault in Production
true, falsetruetrue

CUBESTORE_METRICS_FORMAT

Define which metrics collector format.

Possible ValuesDefault in DevelopmentDefault in Production
statsd, dogstatsdstatsdstatsd

CUBESTORE_METRICS_ADDRESS

Required IP address to send metrics.

Possible ValuesDefault in DevelopmentDefault in Production
A valid IP address127.0.0.1127.0.0.1

CUBESTORE_METRICS_PORT

Required port to send where collector server accept UDP connections.

Possible ValuesDefault in DevelopmentDefault in Production
A valid port number81258125

CUBEJS_TOUCH_PRE_AGG_TIMEOUT

The number of seconds without a touch before pre-aggregation is considered orphaned and marked for removal. Please see CUBEJS_DROP_PRE_AGG_WITHOUT_TOUCH to learn more.

Possible ValuesDefault in DevelopmentDefault in Production
A valid number8640086400

CUBEJS_WEB_SOCKETS

If true, then use WebSocket for data fetching.

Possible ValuesDefault in DevelopmentDefault in Production
true, falsetruetrue

CUBESTORE_AWS_ACCESS_KEY_ID

The Access Key ID for AWS. Required when using AWS S3.

Possible ValuesDefault in DevelopmentDefault in Production
A valid AWS Access Key ID (opens in a new tab)N/AN/A

CUBESTORE_AWS_SECRET_ACCESS_KEY

The Secret Access Key for AWS. Required when using AWS S3.

Possible ValuesDefault in DevelopmentDefault in Production
A valid AWS Secret Access Key (opens in a new tab)N/AN/A

CUBESTORE_AWS_CREDS_REFRESH_EVERY_MINS

The number of minutes after which Cube Store should refresh AWS credentials. Required when using an AWS instance role.

Possible ValuesDefault in DevelopmentDefault in Production
A valid number in minutes180180

CUBESTORE_BIND_ADDR

The address/port pair for Cube Store's MySQL-compatible interface.

Possible ValuesDefault in DevelopmentDefault in Production
A valid address/port pair0.0.0.0:33060.0.0.0:3306

CUBESTORE_DATA_DIR

A path on the local filesystem to store a local replica of the data. Must be unique on each node and different from CUBESTORE_REMOTE_DIR.

Possible ValuesDefault in DevelopmentDefault in Production
A valid path on the local filesystem with read/write access.cubestore/data.cubestore/data

CUBESTORE_GCP_CREDENTIALS

A Base64-encoded JSON key for connecting to Google Cloud. Required when using Google Cloud Storage

Possible ValuesDefault in DevelopmentDefault in Production
A valid Google Cloud JSON key encoded as a Base64 string (opens in a new tab)N/AN/A

CUBESTORE_GCP_KEY_FILE

The path to a JSON key file for connecting to Google Cloud. Required when using Google Cloud Storage.

Possible ValuesDefault in DevelopmentDefault in Production
A valid Google Cloud JSON key file (opens in a new tab)N/AN/A

CUBESTORE_GCS_BUCKET

The name of a bucket in GCS. Required when using GCS

Possible ValuesDefault in DevelopmentDefault in Production
A valid bucket name in the Google Cloud accountN/AN/A

CUBESTORE_GCS_SUB_PATH

The path in a GCS bucket to store pre-aggregations. Optional

Possible ValuesDefault in DevelopmentDefault in Production
A valid path prefixN/AN/A

CUBESTORE_HTTP_BIND_ADDR

The address/port pair for Cube Store's HTTP interface.

Possible ValuesDefault in DevelopmentDefault in Production
A valid address/port pair0.0.0.0:30300.0.0.0:3030

CUBESTORE_HTTP_PORT

The port for Cube Store to listen to HTTP connections on. Ignored when CUBESTORE_HTTP_BIND_ADDR is set.

Possible ValuesDefault in DevelopmentDefault in Production
A valid port number30303030

CUBESTORE_JOB_RUNNERS

The number of parallel tasks that process non-interactive jobs like data insertion, compaction etc.

Possible ValuesDefault in DevelopmentDefault in Production
A valid number44

CUBESTORE_LOG_LEVEL

The logging level for Cube Store.

Possible ValuesDefault in DevelopmentDefault in Production
error, warn, info, debug, traceerrorerror

See also CUBEJS_LOG_LEVEL.

CUBESTORE_META_ADDR

The address/port pair for the Cube Store router node in the cluster.

Possible ValuesDefault in DevelopmentDefault in Production
A valid address/port pairN/AN/A

CUBESTORE_META_PORT

The port for the Cube Store router node to listen for connections on. Ignored when CUBESTORE_META_ADDR is set.

Possible ValuesDefault in DevelopmentDefault in Production
A valid port numberN/AN/A

CUBESTORE_MINIO_ACCESS_KEY_ID

The Access Key ID for minIO. Required when using minIO.

Possible ValuesDefault in DevelopmentDefault in Production
A valid minIO Access Key IDN/AN/A

CUBESTORE_MINIO_BUCKET

The name of the bucket that you want to use minIO. Required when using minIO.

Possible ValuesDefault in DevelopmentDefault in Production
A valid bucket nameN/AN/A

CUBESTORE_MINIO_CREDS_REFRESH_EVERY_MINS

The number of minutes after which Cube Store should refresh minIO credentials.

Possible ValuesDefault in DevelopmentDefault in Production
A valid number in minutes180180

CUBESTORE_MINIO_REGION

The region of a bucket in AWS. Optional when using minIO.

Possible ValuesDefault in DevelopmentDefault in Production
A valid S3 region name, an empty string if not presentN/AN/A

CUBESTORE_MINIO_SECRET_ACCESS_KEY

The Secret Access Key for minIO. Required when using minIO.

Possible ValuesDefault in DevelopmentDefault in Production
A valid minIO Secret Access KeyN/AN/A

CUBESTORE_MINIO_SERVER_ENDPOINT

The minIO server endpoint. Required when using minIO.

Possible ValuesDefault in DevelopmentDefault in Production
A valid minIO endpointN/AN/A
CUBESTORE_MINIO_SERVER_ENDPOINT=http://localhost:9000

CUBESTORE_NO_UPLOAD

If true, prevents uploading serialized pre-aggregations to cloud storage.

Possible ValuesDefault in DevelopmentDefault in Production
true, falsefalsefalse

CUBESTORE_PORT

The port for Cube Store to listen to connections on. Ignored when CUBESTORE_BIND_ADDR is set.

Possible ValuesDefault in DevelopmentDefault in Production
A valid port number33063306

CUBESTORE_QUERY_TIMEOUT

The timeout for SQL queries in seconds.

Possible ValuesDefault in DevelopmentDefault in Production
A number in seconds120120

CUBESTORE_REMOTE_DIR

A path on the local filesystem to store metadata and datasets from all nodes as if it were remote storage. Not required if using GCS/S3. Not recommended for production usage

Possible ValuesDefault in DevelopmentDefault in Production
A valid path on the local filesystem with read/write accessN/AN/A

CUBESTORE_S3_BUCKET

The name of a bucket in AWS S3. Required when using AWS S3.

Possible ValuesDefault in DevelopmentDefault in Production
A valid bucket name in the AWS accountN/AN/A

CUBESTORE_S3_REGION

| The region of a bucket in AWS S3. Required when using AWS S3.

Possible ValuesDefault in DevelopmentDefault in Production
A valid AWS region (opens in a new tab)N/AN/A

CUBESTORE_S3_SUB_PATH

The path in a AWS S3 bucket to store pre-aggregations. Optional.

Possible ValuesDefault in DevelopmentDefault in Production
A valid path prefixN/AN/A

CUBESTORE_SELECT_WORKERS

The number of Cube Store sub-processes that handle SELECT queries.

Possible ValuesDefault in DevelopmentDefault in Production
A valid number44

CUBESTORE_SERVER_NAME

The full name and port number of the Cube Store node (either the router or a worker). Must be unique for each instance in the Cube Store cluster.

Should be passed to the Cube Store router and to each Cube Store worker.

Possible ValuesDefault in DevelopmentDefault in Production
A valid address/port pairlocalhostlocalhost

CUBESTORE_TELEMETRY

If true, then sends telemetry to Cube.

Possible ValuesDefault in DevelopmentDefault in Production
true, falsetruetrue

CUBESTORE_WAL_SPLIT_THRESHOLD

The maximum number of rows to keep in a single chunk of data right after insertion.

Possible ValuesDefault in DevelopmentDefault in Production
A valid number262144262144

CUBESTORE_WORKER_PORT

The port for Cube Store workers to listen to connections on. When set, the node will start as a Cube Store worker in the cluster

Possible ValuesDefault in DevelopmentDefault in Production
A valid port numberN/AN/A

CUBESTORE_WORKERS

A comma-separated list of address/port pairs of Cube Store workers.

Should be passed to the Cube Store router and to each Cube Store worker.

Possible ValuesDefault in DevelopmentDefault in Production
A comma-separated list of address/port pairsN/AN/A
CUBESTORE_WORKERS=worker-1:3123,localhost:3124,123.124.125.128:3123

Used to implement stateless addressing within a Cube Store cluster. By analyzing CUBESTORE_WORKERS and CUBESTORE_SERVER_NAME, each node is able to determine its position within a Cube Store cluster. This allows each worker to know which pre-aggregation partitions it owns and how the load is distributed across all workers.

DEBUG_LOG

If true, enables debug logging.

Possible ValuesDefault in DevelopmentDefault in Production
true, falsefalsefalse

PORT

The port for a Cube deployment to listen to API connections on.

Possible ValuesDefault in DevelopmentDefault in Production
A valid port number40004000