> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to use Tableau Adapter

> [!NOTE]
>
> This feature requires a license that enables the `bi-adapter` component.

## Prerequisites

* **Atoti application**: An active Atoti application with a cube available.
* **Atoti Tableau Adapter**:
  [Activated on the server](https://docs.activeviam.com/engine/java-sdk/6.2/user_guide/querying/front_ends/tableau/tableau_adapter_how_to.md#how-to-activate-the-atoti-tableau-adapter).
* **Tableau**: Tableau Desktop or Tableau Cloud access. Tableau Desktop is supported from version
  **2026.1** onwards. Tableau Cloud also requires Tableau Desktop, to publish the `.tds` file.
* **PostgreSQL JDBC driver**: Required for Tableau Desktop, including to publish to Tableau Cloud. The **42.7.7** version of the
  driver is the only one guaranteed to work with Atoti. This version may be upgraded in any bugfix
  release. However, if you have tested a more recent version and it does not work, please open a support ticket.

## How to activate the Atoti Tableau Adapter

To activate the Atoti Tableau Adapter you need to follow these steps:

### 1. Add the SQL Bridge artifact

Include the following dependency in your `pom.xml` file:

```xml theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
<dependency>
    <groupId>com.activeviam.activepivot</groupId>
    <artifactId>activepivot-server-sql-bridge</artifactId>
    <version>${atoti-server.version}</version>
</dependency>
```

This artifact provides the [BI Adapter SQL endpoint](https://docs.activeviam.com/engine/java-sdk/6.2/user_guide/querying/front_ends/sql_endpoint.md) the Tableau Adapter is built on,
covering the listening port, encryption, and monitoring.

### 2. Enable the SQL endpoint

Follow [How to enable the SQL endpoint](https://docs.activeviam.com/engine/java-sdk/6.2/user_guide/querying/front_ends/sql_endpoint.md#how-to-enable-the-sql-endpoint).

## How to connect Tableau to Atoti

This guide explains how to connect Tableau (Desktop or Cloud) to an Atoti server using the PostgreSQL JDBC driver.
Only User/Password authentication is supported.

See [Which SQL is supported?](https://docs.activeviam.com/engine/java-sdk/6.2/user_guide/querying/front_ends/sql_endpoint.md#which-sql-is-supported) for the scope of SQL queries
the SQL endpoint accepts.

### Connect using a Tableau data source file

Atoti can generate the Tableau data source file (`.tds`) of a cube.
A `.tds` file holds no data: it only stores the connection information and the field metadata Tableau
needs to open a data source, so it can be shared and reopened like a shortcut to the cube.
See the [Tableau documentation](https://help.tableau.com/current/pro/desktop/en-us/environ_filesandfolders.htm)
for the full description of the format.

The file generated by Atoti declares Tableau multilevel hierarchies that mirror the cube's own
multilevel hierarchies and therefore reproduces the cube's structure in Tableau.

Always connect Tableau to Atoti through this file.
Connecting with the PostgreSQL connector alone is not supported.

Atoti generates the file on request, through the
[BI adapter REST API](https://docs.activeviam.com/engine/rest/bi-adapter-rest-api).
See that reference for the endpoint path, its parameters and its responses.

The following command downloads the `.tds` file of the `SALES_CUBE` cube, specifying that Tableau
should connect to `my-atoti-host`.

```bash theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
curl -u username:password \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"host":"my-atoti-host"}' \
  "http://<atoti-server-host>:<atoti-server-port>/activeviam/bi-adapter/rest/v1/tableau/tds/SALES_CUBE" \
  -o SALES_CUBE.tds
```

**Server-side configuration**

The SQL port and the level-name mode are not request parameters.
They are configured on the [BI Adapter SQL endpoint](https://docs.activeviam.com/engine/java-sdk/6.2/user_guide/querying/front_ends/sql_endpoint.md#configuration-reference).

#### Use the file with Tableau Cloud

Tableau Cloud does not open a `.tds` file directly.
Open the file in Tableau Desktop, then publish it to Tableau Cloud as a data source:

1. Open the `.tds` file in Tableau Desktop and sign in to the Atoti server with a username and password.
2. Select **Server** > **Publish Data Source**, then sign in to the Tableau Cloud site.
3. Keep the connection live, and set **Authentication** to **Embedded password**.
   See the [Tableau documentation](https://help.tableau.com/current/online/en-us/publishing_sharing_authentication.htm)
   for the other authentication options.
4. Click **Publish**.

Workbooks on Tableau Cloud then connect to the published data source.
Tableau Cloud queries Atoti from Tableau's infrastructure, so the host and port written in the
`.tds` file must be reachable from there.
