# Tableau TDE

There is a wide range of options for sending data to the Tableau ecosystem. This data destination connector creates
[Tableau Data Extract (TDE)](https://www.tableau.com/about/blog/2014/7/understanding-tableau-data-extracts-part1)
files and optionally uploads them to a destination (Tableau Server,
[Dropbox](https://www.dropbox.com/), [Google Drive](https://www.google.com/drive/)). As such it is more suitable
to be used together with [Tableau Desktop](https://www.tableau.com/products/desktop) or
[Tableau Server](https://www.tableau.com/products/server). An alternative approach is to send data using the
**[Snowflake data destination connector](https://help.keboola.com/components/writers/database/snowflake/)** through a
[Keboola-provisioned database](https://help.keboola.com/components/writers/database/snowflake/#using-keboola-snowflake-database). That is more suitable to be used
together with [Tableau Online](https://www.tableau.com/products/cloud-bi) and also for larger data sets.
Both approaches are interchangeable though.

New to data destination connectors? [Send a table to Google Sheets](https://help.keboola.com/getting-started/write/) in
Getting Started walks through the pattern on a simpler destination first. You can also watch our
[Tableau Integration Demo](https://www.youtube.com/watch?v=FS1nndJ0vyQ) on YouTube.

**Before you start**

You need:

- **To upload to Tableau Server, a user name and password** for a user that can publish data sources to the target project. Personal access tokens aren't supported. Creating and downloading the files needs nothing outside Keboola.
- **Or, to upload to Dropbox or Google Drive, an account** you can authorize (/components/authorization/).
- **If your Tableau Server accepts connections only from known addresses,** allow the Keboola IP addresses (/components/ip-addresses/) of your stack.
- **Run the connector in the production branch:** its jobs are blocked in development branches (/components/branches/).

What each tab needs:

- **Prompt tab:** Kai, the **Kai Agent** button in the top bar, on supported stacks. A new Free Plan project has it from the start; elsewhere an organization admin turns it on once: Get started with Kai (/kai/getting-started/).
- **UI tab:** a browser.
- **CLI / API tab:** kbagent (/cli/getting-started/), connected to your project. The checks only read.

## Configuration
[Create a new configuration](https://help.keboola.com/components/configurations/#create-a-configuration) of the **Tableau** connector.

Then create a new table configuration by clicking the **New Table** button. Select a table
from [Storage](https://help.keboola.com/storage/tables/).

![Screenshot - Select Table](https://help.keboola.com/components/writers/bi-tools/tableau/tableau-1.png)

When you start configuring a table, it is possible to set all columns to the prevailing data type, e.g., `string` and
then configure only the differing columns.

![Screenshot - Table Configuration Start](https://help.keboola.com/components/writers/bi-tools/tableau/tableau-2.png)

For each column you may select one of the data types supported by
TDE (`string`, `boolean`, `number`, `decimal`, `date`, `datetime`) or `IGNORE`, which means that the column will not
be part of the TDE file. When configuring the data types, use the *Preview* icon to peek at the data. For `date` and
`datetime` columns, you also have to specify the format in which dates are present in the table.

![Screenshot - Table Configuration Columns](https://help.keboola.com/components/writers/bi-tools/tableau/tableau-3.png)

As optional last steps in table configuration, you can configure the name of the TDE file (useful for uploading to Dropbox or Google Drive)
and *Table data filter*. The table data filter allows you to set a simple filter for one column or
take advantage of [Incremental processing](https://help.keboola.com/storage/tables/incremental-loading/#incremental-processing) by writing only
recently modified data.

![Screenshot - Table Configuration Additional Settings](https://help.keboola.com/components/writers/bi-tools/tableau/tableau-4.png)

When done with configuring the table, don't forget to **Save** the settings.

## Downloading TDE File
You can configure as many tables as you want for the data destination connector. Each table produces a separate TDE file, however. To download
the TDE file, you have to **Run** the entire connector or a single table. Then the TDE file name will turn into a link through
which you can download the TDE file to your computer.

![Screenshot - TDE Download](https://help.keboola.com/components/writers/bi-tools/tableau/tableau-5.png)

## Uploading TDE File
Apart from downloading the TDE files to your computer, you can also upload them to Tableau Server, Google Drive, or Dropbox.
Start the upload configuration by clicking on the **Set up Upload** link:

![Screenshot - Upload Setup](https://help.keboola.com/components/writers/bi-tools/tableau/tableau-6.png)

Then click **Choose Destination** and select the destination service. You can change the destination later, 
but only one destination can be used for one connector configuration.

![Screenshot - Upload Destination](https://help.keboola.com/components/writers/bi-tools/tableau/tableau-7.png)

For [Dropbox](https://www.dropbox.com/) and [Google Drive](https://www.google.com/drive/) configurations click the
**Authorize** button to [authorize](https://help.keboola.com/components/authorization/) the respective service.

For Google Drive, you may also select the destination
folder. For Dropbox, the destination folder is always `Apps\Keboola Connection Writer V2\`.
For writing to Tableau Server, you need to enter the credentials using the **Set up Credentials** button:

![Screenshot - Tableau Server Authorization](https://help.keboola.com/components/writers/bi-tools/tableau/tableau-8.png)

To activate the table upload, click the *Enable instant upload* link. Only when **Instant Upload** is enabled, the
TDE files will be written to the selected destination.

![Screenshot - Authorized](https://help.keboola.com/components/writers/bi-tools/tableau/tableau-9.png)

Don't forget to **Save** the configuration, then click **Run Component**.

**Check:**

### Prompt

```text title="Prompt" wrap
Did the last job of the Tableau TDE data destination configuration my-tableau-config end with success, and which files in Storage are tagged tde and table-export?
```

Kai only reads here, so it asks for no approval, and its answer links to what it found in your project.

### UI

The job ends with **Success**, each table's TDE file name turns into a download
link, and the files are in **Storage** → **Files** with the tags `tde` and `table-export`. With **Instant Upload**
on, the files also appear in the selected destination.

### CLI / API

```bash
kbagent job list --component-id tde-exporter --limit 1
kbagent storage files --tag tde --tag table-export --limit 10
```

If you have several configurations, add `--config-id` with yours to the first command; the job's `status` shows `success`, each file shows its `name`, `tags` and `created` time; with **Instant Upload** on, also check the destination as in the UI tab.

---
