# Tableau

Tableau is a business intelligence platform for publishing and sharing interactive dashboards, workbooks, and data visualizations. Connecting Tableau to Duvo lets your assignments access published analytics, query data sources, and incorporate live BI insights into automated workflows.

## Setup

Tableau connects through a **Connected App** using OAuth via JWT. This Duvo connection currently supports Connected App credentials only, so you will need to create a Connected App in your Tableau site settings and provide those credentials to Duvo.

### Prerequisites

* A Tableau Cloud or Tableau Server account with site role **Explorer** or higher.
* A site admin must [create and enable a Connected App](https://help.tableau.com/current/online/en-us/connected_apps_direct.htm) (Direct Trust) for Duvo. The app is disabled by default after creation and must be explicitly enabled.
* **VizQL Data Service** must be enabled on the site for data source schema and query capabilities. Available on Tableau Cloud by default; Tableau Server requires version **2025.1+**.
* **Data Management license** at the site level for Metadata API access (used for data source field enrichment).
* For details on enabling these features, see the [Connected Apps documentation](https://help.tableau.com/current/online/en-us/connected_apps_direct.htm) and [VizQL Data Service configuration](https://help.tableau.com/current/api/vizql-data-service/en-us/docs/vds_vizql_data_service_config.html).

### Required Permissions

* Site role of **Explorer**, **Explorer (Can Publish)**, **Creator**, **Site Administrator Explorer**, or **Site Administrator Creator**. Viewer is not sufficient.
* **View** capability on workbooks and views that Duvo should access.
* **View** and **Connect** capabilities on data sources that Duvo should access.
* **API Access** capability on data sources for schema and query operations. This is not granted by default and must be explicitly assigned by an admin per data source or via project default permissions.

### Creating a Connected App

1. Sign in to Tableau as a site admin.
2. Go to **Settings** > **Connected Apps**.
3. Click **New Connected App** > **Direct Trust**.
4. Enter a name (e.g., `Duvo Integration`).
5. Click **Create**.
6. Copy the **Client ID** displayed on the app page.
7. Click **Generate New Secret**. Copy both the **Secret ID** and **Secret Value** (the secret value is shown only once).
8. **Enable the Connected App** — it is disabled by default. Click the three-dot actions menu next to the app and select **Enable**. Authentication will fail until the app is enabled.

### Connection Fields

| Field                       | Description                                                                                                           |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| **Connected App Client ID** | The Client ID shown when you create the Connected App in Tableau.                                                     |
| **Secret ID**               | The UUID generated when you click Generate New Secret in the Connected App settings.                                  |
| **Secret Value**            | The secret value shown once when the secret is generated. Copy and store it securely.                                 |
| **Username**                | The Tableau username to act as. Use the user's email address for Tableau Cloud, or their Tableau username for Server. |
| **Server URL**              | The base URL of your Tableau Cloud or Tableau Server site (e.g., `https://dub01.online.tableau.com`).                 |
| **Site Name**               | The site name from your Tableau URL after `/site/`. For Tableau Server default site, leave this blank.                |

### Third-Party Documentation

* [Connected Apps (Direct Trust)](https://help.tableau.com/current/online/en-us/connected_apps_direct.htm) — creating and managing Connected Apps.
* [REST API Authentication](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_concepts_auth.htm) — overview of Tableau authentication methods.
* [VizQL Data Service Configuration](https://help.tableau.com/current/api/vizql-data-service/en-us/docs/vds_vizql_data_service_config.html) — enabling data source queries.

## Capabilities

* **Browse published content** — List and discover workbooks, dashboards, views, and projects across your Tableau site.
* **Inspect data source schemas** — Retrieve field names, types, and metadata for any connected data source.
* **Run read-only queries** — Execute queries against published data sources and return results, without modifying any data in Tableau.

## Key Benefits

* **Direct access to live analytics** — Query dashboards and data sources without manual logins or CSV exports.
* **Automated data-driven workflows** — Use real-time Tableau data to trigger actions, populate reports, or inform decisions.
* **Consistent source of truth** — Assignments always reference the same published dashboards and data sources your team relies on.
* **No data duplication** — Query data in place rather than exporting and re-importing between tools.

## Works Well With

* **Google Sheets or Microsoft Excel** — Pull data from Tableau data sources into spreadsheets for further analysis or distribution.
* **Slack or Microsoft Teams** — Post dashboard summaries or metric alerts to channels based on Tableau data.
* **Gmail or Microsoft Outlook** — Include Tableau-derived insights in automated email reports sent to stakeholders.
