If the cluster is configured within a VPC (opens in a new tab), then Cube must have a network route to the cluster.
- The hostname (opens in a new tab) for the AWS Redshift (opens in a new tab) cluster
- The username/password (opens in a new tab) for the AWS Redshift (opens in a new tab) cluster
- The name of the database to use within the AWS Redshift (opens in a new tab) cluster
Add the following to a
.env file in your Cube project:
In some cases you'll need to allow connections from your Cube Cloud deployment IP address to your database. You can copy the IP address from either the Database Setup step in deployment creation, or from Settings → Configuration in your deployment.
The following fields are required when creating an AWS Redshift connection:
Cube Cloud also supports connecting to data sources within private VPCs. If you already have VPCs enabled in your account, check out the VPC documentation to learn how to get started.
|The host URL for a database
|A valid database host URL
|The port for the database connection
|A valid port number
|The name of the database to connect to
|A valid database name
|The username used to connect to the database
|A valid database username
|The password used to connect to the database
|A valid database password
true, enables SSL encryption for database connections from Cube
|The number of concurrent connections each queue has to the database. Default is
|A valid number
|The maximum number of concurrent database connections to pool. Default is
|A valid number
Measures of type
not be used in pre-aggregations when using AWS Redshift as a source database.
To learn more about pre-aggregation build strategies, head here.
|Works with read-only mode?
By default, AWS Redshift uses batching to build pre-aggregations.
Cube requires the Redshift user to have ownership of a schema in Redshift to support pre-aggregations.
By default this schema is named
prod_pre_aggregations but it can be customized using the
CUBEJS_PRE_AGGREGATIONS_SCHEMA environment variable.
No extra configuration is required to configure batching for AWS Redshift.
AWS Redshift only supports using AWS S3 for export buckets.
For improved pre-aggregation performance with large datasets, enable export bucket functionality by configuring Cube with the following environment variables:
Ensure the AWS credentials are correctly configured in IAM to allow reads and writes to the export bucket in S3.
To enable SSL-encrypted connections between Cube and AWS Redshift, set the
CUBEJS_DB_SSL environment variable to
true. For more information on how to
configure custom certificates, please check out Enable SSL Connections to the