Connecting from Tableau

You can connect to Cube from Tableau, a visual analytics platform, using the Cube SQL API.

Don't have a Cube project yet? Learn how to get started here.

Click How to connect your BI tool link on the Overview page, navigate to the SQL API tab and enable it. Once enabled, 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 Tableau later.

CUBEJS_PG_SQL_PORT=5432
CUBEJS_SQL_USER=myusername
CUBEJS_SQL_PASSWORD=mypassword

Tableau connects to Cube as to a Postgres database.

In Tableau, select PostgreSQL connector and enter credentials from the above step.

adding Cube to Tableau as a SQL data source

Your cubes will be exposed as tables, where both your measures and dimensions are columns.

Cube data in Tableau

Did you find this page useful?