Using Tableau Server with Treasure Data allows you to interactively explore substantial amounts of data and share data information across your organizations.

For sample workflows of exporting to Tableau Server, view Treasure Boxes.
- Basic knowledge of Treasure Data.
- A license and its installation of the Tableau Server.
- You must set up HTTPS (SSL). Configure SSL on your Tableau Server.
Tableau doesn't support fractional seconds in a timestamp. Remove fractional seconds (e.g., using the subtle () function) before casting the timestamp to the TIMESTAMP type in the query.
The maximum result record is 250,000,000 records. If exceeded, the log displays the message: Extract file records limit exceeded: 250000000.
The lowest Timestamp value is 1000-01-01 00:00:00. If exceeded, the log displays the invalid date value message.
.hyper extracts published to Tableau Server 10.5 via REST API will have the .tde file extension on the Tableau Console. These extracts were still in .hyper file format and functioned similarly to other .hyper extracts. The issue is fixed in 2018.1. More details: Tableau Server 2018.1 Release Notes (search for Issue ID 754677)
A Data Source belonging to a nested Project cannot be appended by using a REST API. A Resource Not Found error is returned. Replace mode does not have this issue. A fix is planned for Tableau Server 2018.1.4. If you encounter this error, it's recommended that you upgrade to the latest version of Tableau Server.
When you authenticate with a PAT, you can only run one process using that PAT at a time (unlike when you authenticate using a username and password). If you run a second authentication using the same PAT while the first job is still running, it causes the authentication/authorization for the first job to be dropped and results in errors.
It results in the following message in the job logs:2021-12-26 07:55:47.926 +0000 [WARN] (0001:transaction): Retrying 2/7 after 2 seconds. Message: javax.ws.rs.WebApplicationException: HTTP 401 Unauthorized .... 2021-12-26 07:57:53.523 +0000 [ERROR] (main): org.embulk.util.retryhelper.RetryGiveupException: java.lang.NullPointerException
Tableau will deprecate support for the TDE file format across the suite of Tableau products. Starting in June 2022 with the release of 2022.2, Tableau Online and Public will not allow TDE content to be published. Beginning in March 2023 with release 2023.1, Tableau Server, Desktop, and Prep will no longer support the TDE file format.
Tableau has updated its data engine with a technology called Hyper. To take advantage of this, you must update your existing Treasure Data output configurations. New Treasure Data configurations automatically use the latest version.
To upgrade your existing configurations:
- Go to Queries and select your scheduled query.
- In Query Editor, select Export Results target.
- Choose your saved Tableau connection.
- Input the Site ID value; it’s required for multi-tenant Tableau Server (leave it empty if you sign in to Default site).
- Select 'hyper' for Data Source Type.
- Select Done to save your configuration.
When migrating from the legacy Tableau to the current Tableau, you do not need to change the timezone configuration. You can leave the default value (UTC). See also the timezone in this article.
From the command line from within the Tableau apps or from your Tableau administrator, obtain the following:
- Host
- Username
- Password
- Server Version
Your user profile to connect to Tableau should have read and export rights.
To determine the value to use for the site attribute, sign in to Tableau Server, and examine the value that appears after /site/ in the URL. For example, in the following URL, the site value is MarketingTeam:
https://MyServer/#/site/MarketingTeam/projects
If the site The attribute is an empty string, and you are signed in to the default site. You are always signed in to a specific site, even if you don’t specify a site when you sign in.
Read the REST API reference for the Tableau Server.
The Tableau Online Authentication method with User/Password was deprecated and replaced by PAT (personal access token)
To obtain PAT: https://help.tableau.com/current/pro/desktop/en-us/useracct.htm#create-and-revoke-personal-access-tokens
There should be at least one 'Default' project on the Tableau Server. You can't delete or rename this project. The' Default' project is used if you omit the Project Name option.
In some rare cases, primarily non-English Tableau Server, the 'Default' project name is localized, and jobs fail if you don't provide a Project Name (because it couldn't find a project with 'Default' as the name).
You must create and configure the data connection in Treasure Data before running your query. As part of the data connection, you provide authentication to access the integration.
Open TD Console.
Navigate to Integrations Hub > Catalog.
Search for and select Tableau.

Select Create Authentication.
Type the credentials to authenticate.


Type a name for your connection.
Select Done.

| Parameter | Values | Description |
|---|---|---|
| Datasource Name | The name you want to use for this data export. | |
| Site ID | Required for a multi-tenant server configuration, such as Tableau Online. If you don’t have a specific Site, set EMPTY String for Tableau Server The URL of the site to sign in to (optional) To determine the value to use for the site attribute, sign in to Tableau Server, and examine the value that appears after /site/ in the URL. For example, in the following URL, the site value is MarketingTeam: https://MyServer/#/site/MarketingTeam/projects If the site attribute is an empty string, you are signed in to the default site. You are always signed in to a specific site, even if you don’t specify a site when you sign in. Read the [REST API reference](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref.htm#Sign_In?TocPath=API%2520Reference | |
| Project Name | Required if your Tableau Server does not have a 'Default' project. It is recommended that you fill it out for non-English locales. Go to your Tableau Server to get a list of projects. | |
| Mode | append replace | replace to replace Data Source each time, append to append to existing Data Source Append Mode ignores new columns if it is exporting data inserted from an existing data source because of the specification of the Tableau. |
| Data Source Type | hyper tde | Hyperfiles contain one or more tables worth of data. tde is a file format for Tableau data extraction. |
| Extract File Chunk Size | An extract file is split into chunks before it is exported to Tableau. Indicate a chunk size between 50 to 512 MB Chunk file size (in MB) to be uploaded each time, default: 200, min: 100, max: 1024 | |
| HTTP read timeout | Value in milliseconds | |
| Failed the job when timeout? | If checked, the running job will fail in publishing data source timeout. | |
| Timezone | The timezone timestamp values will be stored as in Tableau. Timezone ID to use when converting from Timestamp (timezone-independent) to Tableau DateTime (timezone-dependent). The timestamp value is timezone-independent. For example, 1548979200. The Tableau DateTime includes day, hour, minute, etc. The connector needs to know the target timezone to convert from timestamp value to Tableau DateTime. If your query contains a TIMESTAMP column or cast a DateTime column, the value is exported to the Tableau server as DateTime. This means there is a conversion, and you must provide a target timezone. Treasure Data stores the DateTime value using the UTC timezone. In most cases, leave timezone configured as default (UTC), to preserve the value from Treasure Data, unless you particularly want to convert the value to another timezone. |
The following example query uses the access log example data set and calculates the distribution of the HTTP method per day. For convenience, it casts the Datetime column to TIMESTAMP from String in Tableau.
HIVE:
SELECT
CAST(TD_TIME_FORMAT(time, "yyyy-MM-dd 00:00:00") AS TIMESTAMP) AS "dates",
method AS `Method`,
COUNT(1) AS `Count`
FROM
www_access
GROUP BY
TD_TIME_FORMAT(time, "yyyy-MM-dd 00:00:00"),
methodPRESTO:
For convenience, we recommend using TD_TIME_FORMAT instead of TD_TIME_STRING in Presto queries.
SELECT
CAST(TD_TIME_FORMAT(time, 'yyyy-MM-dd 00:00:00') AS TIMESTAMP) AS "dates",
method AS `Method`,
COUNT(1) AS `Count`
FROM
www_access
GROUP BY
TD_TIME_FORMAT(time, 'yyyy-MM-dd 00:00:00'),
methodYou can use Scheduled Jobs with Result Export to periodically write the output result to a target destination that you specify.
Treasure Data's scheduler feature supports periodic query execution to achieve high availability.
When two specifications provide conflicting schedule specifications, the specification requesting to execute more often is followed while the other schedule specification is ignored.
For example, if the cron schedule is '0 0 1 * 1', then the 'day of month' specification and 'day of week' are discordant because the former specification requires it to run every first day of each month at midnight (00:00), while the latter specification requires it to run every Monday at midnight (00:00). The latter specification is followed.
Navigate to Data Workbench > Queries
Create a new query or select an existing query.
Next to Schedule, select None.

In the drop-down, select one of the following schedule options:

Drop-down Value Description Custom cron... Review Custom cron... details. @daily (midnight) Run once a day at midnight (00:00 am) in the specified time zone. @hourly (:00) Run every hour at 00 minutes. None No schedule.

| Cron Value | Description |
|---|---|
0 * * * * | Run once an hour. |
0 0 * * * | Run once a day at midnight. |
0 0 1 * * | Run once a month at midnight on the morning of the first day of the month. |
| "" | Create a job that has no scheduled run time. |
* * * * *
- - - - -
| | | | |
| | | | +----- day of week (0 - 6) (Sunday=0)
| | | +---------- month (1 - 12)
| | +--------------- day of month (1 - 31)
| +-------------------- hour (0 - 23)
+------------------------- min (0 - 59)The following named entries can be used:
- Day of Week: sun, mon, tue, wed, thu, fri, sat.
- Month: jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec.
A single space is required between each field. The values for each field can be composed of:
| Field Value | Example | Example Description |
|---|---|---|
| A single value, within the limits displayed above for each field. | ||
A wildcard '*' to indicate no restriction based on the field. | '0 0 1 * *' | Configures the schedule to run at midnight (00:00) on the first day of each month. |
A range '2-5', indicating the range of accepted values for the field. | '0 0 1-10 * *' | Configures the schedule to run at midnight (00:00) on the first 10 days of each month. |
A list of comma-separated values '2,3,4,5', indicating the list of accepted values for the field. | 0 0 1,11,21 * *' | Configures the schedule to run at midnight (00:00) every 1st, 11th, and 21st day of each month. |
A periodicity indicator '*/5' to express how often based on the field's valid range of values a schedule is allowed to run. | '30 */2 1 * *' | Configures the schedule to run on the 1st of every month, every 2 hours starting at 00:30. '0 0 */5 * *' configures the schedule to run at midnight (00:00) every 5 days starting on the 5th of each month. |
A comma-separated list of any of the above except the '*' wildcard is also supported '2,*/5,8-10'. | '0 0 5,*/10,25 * *' | Configures the schedule to run at midnight (00:00) every 5th, 10th, 20th, and 25th day of each month. |
- (Optional) You can delay the start time of a query by enabling the Delay execution.
Save the query with a name and run, or just run the query. Upon successful completion of the query, the query result is automatically exported to the specified destination.
Scheduled jobs that continuously fail due to configuration errors may be disabled on the system side after several notifications.
(Optional) You can delay the start time of a query by enabling the Delay execution.
Open your Tableau Server.
Select Data Sources at the top left bar.
You can view the list of data sources, including your TDE file.
Select New Workbook to create the charts and dashboard from the browser.
To create graphs, drag and drop the dimensions and measures from the left navigation to the top right navigation.
Select Save to store the result.

You can also send segment data to the target platform by creating an activation in the Audience Studio.
- Navigate to Audience Studio.
- Select a parent segment.
- Open the target segment, right-mouse click, and then select Create Activation.
- In the Details panel, enter an Activation name and configure the activation according to the previous section on Configuration Parameters.
- Customize the activation output in the Output Mapping panel.

- Attribute Columns
- Select Export All Columns to export all columns without making any changes.
- Select + Add Columns to add specific columns for the export. The Output Column Name pre-populates with the same Source column name. You can update the Output Column Name. Continue to select + Add Columnsto add new columns for your activation output.
- String Builder
- + Add string to create strings for export. Select from the following values:
- String: Choose any value; use text to create a custom value.
- Timestamp: The date and time of the export.
- Segment Id: The segment ID number.
- Segment Name: The segment name.
- Audience Id: The parent segment number.
- + Add string to create strings for export. Select from the following values:
- Set a Schedule.

- Select the values to define your schedule and optionally include email notifications.
- Select Create.
If you need to create an activation for a batch journey, review Creating a Batch Journey Activation.
Within Treasure Workflow, you can specify the use of this data connector to export data.
Learn more at Using Workflows to Export Data with the TD Toolbelt.
timezone: UTC
_export:
td:
database: sample_datasets
tableau:
datasource: datasource_name
site_id: site_id
project: project_name
mode: append
legacy: false
datasource_type: hyper
+td-result-output-tableau:
td>: queries/sample.sql
result_connection: tableau_connection
result_settings:
datasource: ${tableau.datasource}
site: ${tableau.site_id}
project: ${tableau.project}
mode: ${tableau.mode}
legacy: ${tableau.legacy}
target_type: ${datasource_type}