Skip to main content

Tableau

Tableau is an analytics/BI platform that can be used as a standalone tool (Tableau Desktop) or as a hosted analytics platform (Tableau Server).

Tableau DuckDB/MotherDuck Setup

  1. Download a recent version of the DuckDB JDBC driver and copy it into the Tableau Drivers directory:

    • MacOS: ~/Library/Tableau/Drivers/
    • Windows: C:\Program Files\Tableau\Drivers
    • Linux: /opt/tableau/tableau_driver/jdbc
  2. Download the signed tableau connector (aka "Taco file") file from the latest available release and copy it into the Connectors directory:

    • Desktop Windows: C:\Users\[YourUser]\Documents\My Tableau Repository\Connectors
    • Desktop MacOS: /Users/[YourUser]/Documents/My Tableau Repository/Connectors
    • Server Windows: C:\ProgramData\Tableau\Tableau Server\data\tabsvc\vizqlserver\Connectors
    • Server Linux: [Your Tableau Server Install Directory]/data/tabsvc/vizqlserver/Connectors

Connecting

Once the Taco is installed, and you have launched Tableau, you can create a new connection by choosing "DuckDB by MotherDuck":

Tableau connector list

Local DuckDB database

If you wish to connect to a local DuckDB database, select "Local file" as DuckDB Server option, and use the file picker:

DuckDB Server dropdown Connection Dialogue

In-Memory Database

The driver can be used with an in-memory database by selecting the In-memory database DuckDB Server option.

DuckDB Server dropdown

The data will then need to be provided by an Initial SQL string e.g.,

CREATE VIEW my_parquet AS
SELECT *
FROM read_parquet('/path/to/file/my_file.parquet');

You can then access it by using the Tableau Data Source editing controls.

MotherDuck

To connect to MotherDuck, you have two authentication options:

  • Token -- provide the value that you get from MotherDuck UI.
  • No Authentication -- unless motherduck_token environment variable is available to Tableau at startup, you will then be prompted to authenticate when at connection time.

To work with a MotherDuck database in Tableau, you have to provide the database to use when issuing queries. In MotherDuck Database field, provide the name of your database. You don't have to prefix it with md::

DuckDB Server dropdown Connection Dialogue

Additional information