> ## 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.1/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.
* **PostgreSQL JDBC driver**: Required for Tableau Desktop. 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 and enable the SQL endpoint

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 [SQL endpoint](https://docs.activeviam.com/engine/java-sdk/6.1/user_guide/querying/front_ends/sql_endpoint.md) the Tableau Adapter is built on,
covering the listening port and monitoring. Then [enable the SQL endpoint](https://docs.activeviam.com/engine/java-sdk/6.1/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.1/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.
This setup therefore skips both the [manual connection steps](#manual-connection-steps) and the
manual hierarchy creation described in
[How to reproduce the cube's structure](https://docs.activeviam.com/engine/java-sdk/6.1/user_guide/querying/front_ends/tableau/tableau_adapter.md#how-to-reproduce-the-cubes-structure).

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 [SQL endpoint](https://docs.activeviam.com/engine/java-sdk/6.1/user_guide/querying/front_ends/sql_endpoint.md#configuration-reference).

### Manual connection steps

> [tab] Tableau Desktop
>
> Follow these steps to connect Tableau Desktop to an Atoti server:
>
> 1. **Open Tableau Desktop** and create a new file.
>
> 2. Click **Connect to Data** in the upper-left corner.
>
>    ![Tableau Desktop connection first step](https://mintcdn.com/activeviam/fu1io3zqrxuzLJNd/engine/java-sdk/6.1/assets/user_guide/tableau_bi_adapter/tableau_desktop_connect1.png?fit=max\&auto=format\&n=fu1io3zqrxuzLJNd\&q=85\&s=5db6a19248585482634082c22d1840f4)
>
> 3. From the list of connectors, select **PostgreSQL**.
>
>    ![Tableau Desktop connection second step](https://mintcdn.com/activeviam/fu1io3zqrxuzLJNd/engine/java-sdk/6.1/assets/user_guide/tableau_bi_adapter/tableau_desktop_connect2.png?fit=max\&auto=format\&n=fu1io3zqrxuzLJNd\&q=85\&s=a3cfd10fb7a74d303c37f33cd88ea19f)
>
> 4. Fill in the required connection details:
>    * **Address**: IP address of the Atoti server.
>    * **Port**: Port used by the PostgreSQL wire protocol (default is `5432`). If changed, refer to
>      the `atoti.server.sql-bridge.port` property, described on the
>      [SQL endpoint](https://docs.activeviam.com/engine/java-sdk/6.1/user_guide/querying/front_ends/sql_endpoint.md#how-to-choose-the-listening-port) page. When that property is `0`,
>      the port is picked at startup, and the generated `.tds` file is what carries it.
>    * **Database**: Always set to `atoti`.
>    * **Authentication**: Choose your preferred authentication method.
>
>      ![Tableau Desktop connection third step](https://mintcdn.com/activeviam/fu1io3zqrxuzLJNd/engine/java-sdk/6.1/assets/user_guide/tableau_bi_adapter/tableau_desktop_connect3.png?fit=max\&auto=format\&n=fu1io3zqrxuzLJNd\&q=85\&s=a166e38128c49f87f62f439b4204d16b)
>
> 5. Click **Connect** to establish the connection.

> [tab] Tableau Cloud
>
> To connect Tableau Cloud to an Atoti server:
>
> 1. Open a new workbook in Tableau Cloud.
> 2. Click **Connect to Data**, then select **Connectors**.
> 3. Choose the **PostgreSQL** connector.
>
>    ![Tableau Cloud connection first step](https://mintcdn.com/activeviam/fu1io3zqrxuzLJNd/engine/java-sdk/6.1/assets/user_guide/tableau_bi_adapter/tableau_cloud_connect.png?fit=max\&auto=format\&n=fu1io3zqrxuzLJNd\&q=85\&s=b52a59935e3beefb10b664b2108627fb)
> 4. Provide the same connection details as for Tableau Desktop:
>    * **Address**
>
>    * **Port**
>
>    * **Database**
>
> * **Authentication**: Only **username and password** authentication is supported in Tableau Cloud.
>
>   ![Tableau Cloud connection second step](https://mintcdn.com/activeviam/fu1io3zqrxuzLJNd/engine/java-sdk/6.1/assets/user_guide/tableau_bi_adapter/tableau_cloud_connect2.png?fit=max\&auto=format\&n=fu1io3zqrxuzLJNd\&q=85\&s=6666584858c16ed6492e2e97d726e3da)
