You can connect to Cube from Deepnote, a new kind of data notebook that's built for collaboration and is Jupyter compatible, using the Cube SQL API.
Here's a short video guide on how to connect Deepnote to Cube.
Don't have a Cube project yet? Learn how to get started here.
Click Deploy SQL API and then the How to connect your BI tool link on the Overview page of your Cube deployment. Navigate to the BIs and Visualization Tools tab. You should see the screen like the one below with your connection credentials:
You need to set the following environment variables to enable the Cube SQL API. These credentials will be required to connect to Cube from Deepnote later.
CUBEJS_PG_SQL_PORT=5432 CUBEJS_SQL_USER=myusername CUBEJS_SQL_PASSWORD=mypassword
Deepnote connects to Cube as to a Postgres database.
Your cubes will be exposed as tables, where both your measures and dimensions are columns.
You can write SQL in Deepnote that will be executed in Cube. Learn more about Cube SQL syntax on the reference page.
You can also create a visualization of the executed SQL query.