Integrate Cube with Tiger Data
Connect Cube Cloud to Tiger Cloud or self-hosted TimescaleDB to model and query your data through a semantic layer.
Cube is a semantic layer platform that connects to your data, lets you define reusable metrics and dimensions, and exposes them to downstream BI tools and apps through SQL, REST, and GraphQL APIs.
This page shows you how to connect Cube Cloud to Tiger Data as a PostgreSQL data source, so that you can build a semantic layer on top of the data in your service or database.
In this integration guide, you:
- Add your service or database as a data source when creating a Cube Cloud deployment.
- Verify that Cube can query your data.
Prerequisites for this integration guide
To follow these steps, you'll need:
- A Tiger Cloud service, or a running instance of self-hosted TimescaleDB.
- Your connection details.
- A Cube Cloud account.
Add your service or database as a data source
Section titled “Add your service or database as a data source”Cube Cloud connects to your service or database with standard PostgreSQL connection details, entered when you create a deployment.
- Create a deployment
In Cube Cloud, click
+ Create Deploymentto start the setup wizard. - Select PostgreSQL as the data source
When prompted to connect a data source, choose
PostgreSQLfrom the list of drivers. - Enter your connection details
Use your connection details to fill in the connection form:
- Host: your service or database
host. - Port: your
port, usually5432. - Database: your
dbname. - Username and Password: your
userandpassword.
- Host: your service or database
- Enable SSL
If your service or database requires encrypted connections, turn on the
SSLoption for the connection. Tiger Cloud requires SSL; for self-hosted TimescaleDB, this depends on how your instance is configured. - Save the connection
Cube Cloud tests the connection before saving it. Once the test passes, Cube Cloud saves the connection details as environment variables (
CUBEJS_DB_HOST,CUBEJS_DB_PORT,CUBEJS_DB_NAME,CUBEJS_DB_USER,CUBEJS_DB_PASS,CUBEJS_DB_SSL) and starts your deployment.
To change these details later, go to your deployment’s Settings > Configuration > Data Sources, and use Edit on the connection.
Verify the integration
Section titled “Verify the integration”To confirm Cube is working with your service or database:
- Open the Playground
In your Cube Cloud deployment, click
Playgroundin the left navigation. - Run a query
Select a measure or dimension from your data schema and run the query.
You see results returned from your service or database, confirming that Cube can read your data.
You have successfully integrated Cube with Tiger Data.
Troubleshooting
Section titled “Troubleshooting”- Connection test fails during setup: confirm the host and port, and that your network allows connections from Cube Cloud. For Tiger Cloud, make sure
SSLis enabled. - No data schema appears in the Playground: Cube generates the data schema from your database’s tables and columns. Confirm your database user has
SELECTprivileges on the tables you expect to see.
For other connectivity and authentication issues, see Troubleshoot Tiger Cloud integrations.