> ## Documentation Index
> Fetch the complete documentation index at: https://wordsmithai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Tableau

> Load the Wordsmith OData feed into Tableau Cloud or Tableau Desktop.

Tableau reads the Wordsmith [OData feed](https://wordsmithai.mintlify.site/odata-feed.md) with its OData connector, in Tableau Cloud and in Tableau Desktop. The OData feed page covers what an administrator publishes, the tables, and the period options. This page covers the Tableau steps.

Give Tableau the feed's URL, or a report's URL, and it lists every table in that feed. Drag the tables you need onto the canvas, and Tableau relates them in one data source.

## Connect

1. In Wordsmith, create an [API key](https://wordsmithai.mintlify.site/authentication.md) for the user whose view Tableau should load. A key limited to some scopes needs `reports:read`, `usage:read` and `tasks:read` for the tables it loads.
2. Open the OData connector. In Tableau Cloud, choose **New → Workbook**, then **Connectors → OData**. In Tableau Desktop, choose **Connect → To a Server → OData**.
3. In **Server**, enter the feed URL for your region:

   ```
   https://api.wordsmith.ai/api/v1/odata
   ```

   In the US region, use `https://api.us.wordsmith.ai/api/v1/odata`. Add [period options](https://wordsmithai.mintlify.site/odata-feed.md#period-and-scope) to the URL to change the dates the usage and task tables cover, for example `?period=lifetime`. Every table you load from this connection uses them.
4. In **Authentication**, choose **Username and Password**. Enter any user name, and the API key as the password.
5. Select **Sign In**. Tableau lists the feed's tables under **Table**.
6. Drag a table onto the canvas. Tableau builds an extract when you first use it in a sheet.

For a report's rows, connect to the report's own URL instead. Copy it from the `FeedUrl` column of `Reports`, or build it from the report ID:

```
https://api.wordsmith.ai/api/v1/odata/reports/{report_id}
```

Tableau then lists the report's `Rows`, `Cells` and `Columns` tables.

## Relate the tables

Drag a second table from the same connection onto the canvas, next to the first. Tableau relates them on columns that share a name. For a report, that's `RowId` in `Rows` and `Cells`. The usage tables also share metric columns, such as `Interactions` and `Sessions`. A match on one of those gives wrong totals and no error. Open each relationship and set it to the key pair below:

| From | To |
| - | - |
| `UsageSessions.UserKey` | `UsageByUser.Key` |
| `UsageSessions.AgentKey` | `UsageByAgent.Key` |
| `UsageDailyByUser.Key`, `UsageDailyByTeam.Key`, `UsageDailyByAgent.Key`, `UsageDailyBySkill.Key` | `UsageByUser.Key`, `UsageByTeam.Key`, `UsageByAgent.Key`, `UsageBySkill.Key` |
| `Cells.RowId` | `Rows.RowId` |
| `Cells.ColumnId` | `Columns.Id` |

A report's tables and the feed's tables come from different connections, so Tableau can't relate them. Combine them in one sheet with data blending instead.

## Refresh

Tableau loads the feed as an extract, which holds a copy of the table. Each refresh reads the whole table again. To refresh on a schedule in Tableau Cloud, publish the workbook or data source with the password embedded, then schedule an extract refresh.

The feed refuses sorting and counting (`$orderby`, `$count`) with `501`. Tableau sorts and counts in the extract, so this doesn't affect it. See [Filters and limits](https://wordsmithai.mintlify.site/odata-feed.md#filters-and-limits).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.