Observable
Observable is a collaborative data notebook. Here’s a short video guide on how to connect Observable to Cube.Connect from Cube Cloud
Navigate to the Integrations page, click Connect to Cube, and choose Observable to get detailed instructions.Connect from Cube Core
You can connect a Cube deployment to Observable using the SQL API or the REST API. In Cube Core, the SQL API is disabled by default. Enable it and configure the credentials to connect to Observable.Connecting from Observable
Connecting via SQL API
Observable connects to Cube as to a Postgres database.Querying data with SQL API
Your cubes will be exposed as tables, where both your measures and dimensions are columns. Make sure to add a database to your notebook, and select Database query when adding a new block.Connecting via REST API
For a Cube instance publicly available at a specificHOST, the REST API URL
would be HOST/cubejs-api/v1. Please refer to the
REST API page for details.
You will also need to generate a JSON Web Token that would be used to
authenticate requests to Cube.
Please check the Security page
to learn how to generate a token. We suggest generating a long-lived JWT that
won’t expire soon.
Querying data with REST API
First, add two generic JavaScript cells:HOST/cubejs-api/v1, don’t forget
to add the /load endpoint to the end of the data source API.
jsonBody for simplicity. Make sure to add a query parameter
for your JSON query.
jsonBody object inside the
JSON.stringify call.