Cube
Cube is a headless BI platform that makes data accessible and consistent across every application. It provides data modeling, access control, caching, and a variety of APIs (SQL, GraphQL, and REST) on top of any data warehouse, database, or query engine, including Materialize.
In this guide, we’ll cover how to connect and configure a Cube Cloud deployment to Materialize.
Steps
Create and configure Cube
-
Login to Cube and create a deployment
Match the regions to improve latency.
-
Set up the Cube project
You will have the following options to build the project:
• CLI
• Github repository
• Create from scratchClick on the create from scratch option to be align with this guide.
-
Configure the connection to Materialize
Use Cube’s connector for Materialize and fill in the fields.
Field Value Host Materialize host name. Port 6875 Database username Materialize user. Database password App-specific password. Cluster Default cluster for the connection. SSL ✅ -
Configure the default database
Configure the database name as follows:
i. Access Settings
ii. Click on Configuration
iii. AddCUBEJS_DB_NAME
as an environment variable withmaterialize
as a value. -
Configure the cluster name
Configure the cluster name as follows:
i. Access Settings
ii. Click on Configuration
iii. AddCUBEJS_DB_MATERIALIZE_CLUSTER
as an environment variable with the cluster name as a value.
Set and use the schema
-
Build the schema
You can rely on Cube to infer the schema or do it manually. Cube will figure out Materialize’s schema and try to obtain the dimensions, measures, primary keys, and joins.
-
You are all set!
Head to the Playground and start interacting with Materialize.
Related pages
- Shared blog post with additional information and examples.
- Cube’s connector details for Materialize.