title: "Cube" description: "How to connect a Cube deployment to Materialize" aliases: /third-party/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.
Match the regions to improve latency.
You will have the following options to build the project:
• CLI<br/>
• Github repository<br/>
• Create from scratch <br/>
Click on the create from scratch option to be align with this guide.
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 database name as follows:
i. Access Settings
ii. Click on Configuration
iii. Add CUBEJS_DB_NAME
as an environment variable with materialize
as a value.
Configure the cluster name as follows:
i. Access Settings
ii. Click on Configuration
iii. Add CUBEJS_DB_MATERIALIZE_CLUSTER
as an environment variable with the cluster name as a value.
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.
Head to the Playground and start interacting with Materialize.