# Tableau

## Supported Capabilities

{% tabs %}
{% tab title="Supported Capabilities" %}
**General**

* **Metadata** — metadata extraction and display of asset information (tables, columns, schemas). Types collected: Schema, Virtual Table, Virtual Column, Chart, Dashboard
  {% endtab %}

{% tab title="Not Supported" %}
**General**

* Profiling
* Preview
* Data Quality
* Configurable Collection
* External Table
* View Table
* Stored Procedure
  {% endtab %}
  {% endtabs %}

Tableau supports lineage mapping from the following sources:

* Upstream Connectors: bigquery, snowflake, mysql, redshift, postgresql

## Connection Requirements

### Prerequisite - Enable Metadata API

To enable successful metadata ingestion for Tableau so you can see Dashboards and Charts from Tableau, you will need to enable the Tableau Metadata API for Tableau Server. For the guide from Tableau, refer to [this](https://help.tableau.com/current/api/metadata_api/en-us/docs/meta_api_start.html#enable-the-tableau-metadata-api-for-tableau-server).

### Connecting to decube

We require four important information to connect a Tableau instance. For two of those, head to your Tableau dashboard and take a look at your browser's search bar. Grab the URL and it would look like something below:

```
https://<example-server-url.com>/#/site/<example-site-id>/projects
```

Here we need `https://<example-server-url.com>` as `Server URL` and `<example-site-id>` as the `Site ID`

Get a `Personal Access Token` following [this step](#getting-a-personal-access-token).

Then we can fill the connections as so, remember to replace the example URL with your own.

* `Server URL`: \<example-server-url.com>
* `Site ID`: \<example-site-id>

{% hint style="info" %}
If you are using Tableau Server (On-premise), you can leave the Site ID field empty upon submission.
{% endhint %}

* `Token Name`: Personal Access Token Name
* `Token Secret`: Personal Access Token Secret

<figure><img src="https://1779874722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTw0qpCVzfrIXqS4FEg4T%2Fuploads%2Fgit-blob-2675961064540a79669908d46f79771aeeaff836%2Fimage.png?alt=media" alt=""><figcaption><p>Tableau</p></figcaption></figure>

The `Source Name` will be for you to differentiate and recognize particular sources within the decube application.

### Getting a Personal Access Token

decube prefers connecting to Tableau via a Personal Access Token. It is recommended to create a new Access Token for decube and ensure that it is kept safe and secured for ease of management.

1. Go to your Tableau instance, click on your user profile on the top right, then click on *`My Account Settings`*.
2. There, scroll down until you find *`Personal Access Tokens`.*
3. In `Token Name`, type a suitable name, we recommend `decube data observability`. Then click on *`Create New Token`.*
4. A popup will be displayed where you can view `Token Name` and `Token Secret`. Click on *`Copy to clipboard`*. We recommend saving this credential, like on a password manager as the `Token Secret` will only be shown to you once.

## Additional configuration for lineage

To build out the lineage, we will need to know the data sources that you've referenced within your Tableau definitions. You can do a one-time mapping for the sources by using the Additional Config in the Modify Data Sources page. Check out how below.

1. Go to My Account > Data Sources.

<figure><img src="https://1779874722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTw0qpCVzfrIXqS4FEg4T%2Fuploads%2Fgit-blob-21a2804397d2afbde99f9b80b5c9eb4283d0acb0%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

2. Click on Modify.

<figure><img src="https://1779874722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTw0qpCVzfrIXqS4FEg4T%2Fuploads%2Fgit-blob-2d462f875858fc04797612b0ed9ff484a207622c%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Click on the Dropdown for Select Data Sources. Select the data sources (4) that your Tableau objects are referencing to and click on `Save preferences` (5).

<figure><img src="https://1779874722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTw0qpCVzfrIXqS4FEg4T%2Fuploads%2Fgit-blob-e4dce74a3ff6b4adce8867bd3799bc91152823c6%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### FAQ

#### I am not able to see the lineage from my data source to Tableau.

1. Check in the Tableau Settings in the General tab that `Automatic Access to Metadata about Databases and Tables` is enabled in your organization.

<figure><img src="https://1779874722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTw0qpCVzfrIXqS4FEg4T%2Fuploads%2Fgit-blob-e2a2dbcb1e47cab0d141f249e38f9a661877f843%2Fimage%20(13).png?alt=media" alt=""><figcaption></figcaption></figure>

2. If it is enabled, it may be that the access for the user used to generate the Personal Access Token in the step above needs to have its access elevated in the Project. You will need to grant the `Project Leader` access to the user. Read more about the permissions that the `Project Leader` has in this [Tableadocumentation](https://help.tableau.com/current/server/en-us/permissions_projects.htm).
