Tableau REST API integration
Matik's Tableau integration offers a simple point-and-click wizard to pull in data and snapshot PNG images from your published dashboards. Start out by creating a new piece of Dynamic Content. Then select Tableau as the data source. Once you have connected Tableau as a data source, you will go through a wizard.
Scroll down and select which Tableau Workbook you want to connect to, and then specify which View (i.e. a dashboard worksheet) you want to pull data from. Please wait for the views to load if you don’t see them immediately.
Which views you can select depends on the output type:
- Image output: pulling from dashboards and worksheets is supported.
- All other output types: only pulling from worksheets is supported.
Stories are not supported for any output type. Views that contain table calculations or pivots cannot be used directly with Matik. Tableau parameters are also not supported in Matik.
Note that views that aren’t published can’t be accessed by our API and won’t appear in the list options. In order to select them, publish them first in your Tableau instance.
Also note that you may need to whitelist our IP addresses (54.177.196.112, 54.219.155.184, and 52.9.192.216) if you use a VPN to connect to this data source.
Select which fields you want Matik to return, and then further customize the content with the following fields.
-
Filter Returned Fields: Any field in your selected view will be available here. By default, all returned fields will have the filters applied to them that are found in the dashboard. Adding additional filters will further filter the worksheet view selected or overwrite existing filters.
- Tip: You can rename any field by clicking on the field name and typing in a new field alias.
-
Filter: Adds filters to the data — these are the inputs that end users will have to populate in order for Matik to pull this data (i.e.
%:account_name).- Please note that only the = operator is supported at this time. See this documentation on how to filter view queries for more information on how to filter Tableau with Matik.
- Tip: Tableau dates must be formatted to YYYY-MM-DD to use the date picker input.
- Sorting: Adds sorting criteria to choose how you want your data to be ordered.
- Result size: Applies a limit to the amount of data returned.
Our Tableau integration also allows you to pull your existing data visualizations from your Tableau dashboard directly into your presentation. Once you have created your Tableau piece of dynamic content, select "Image" as the output. Then, tag an image object in your template. Make sure to sync your presentation after making changes.
Note: The images will be placed in your presentations as a PNG and cannot be edited once the presentation is generated.
Troubleshooting and Known Limitations
-
I can't find my view, dashboard, or story in the dropdown
- For Image output: pulling from dashboards and worksheets is supported. For all other output types: only pulling from worksheets is supported. Stories are not supported for any output type.
- Ensure your worksheet is published
-
I don't see the Fields that I expect to see in the Filters or Fields to Return dropdown. Or Fields to Return I selected are not included in the results output.
- This is a Tableau bug that can occur with certain Tableau instances. Sometimes, the fields that Tableau lists as available via its Metadata API no longer accurately reflect the fields that are available.
- To confirm this issue: Test API without any Fields to Return selected. The fields returned in the test output are the fields actually included in Tableau.
- To resolve:
- If you know the field names you can manually enter them.
- Alternately, you can reach out to your Matik TAM to enable a workaround. This workaround ensures the field list is accurate, at the cost of potentially slower form loading times.
- Tableau's API does not support continuous date ranges. As a result using date range inputs with Tableau Dynamic Content is not supported.
- Tableau's API does not support special characters (i.e commas, ampersands) when trying to filter dynamic content.
- Ensure your integration user is used for Matik alone. Tableau enforces a limit of 40,000 API requests per hour per integration user.
- Tableau time outs can occur with large worksheets. If possible, reduce the size of your worksheet to only what you need to access for Matik. Reducing the number of columns associated with a work book can have a large impact.
-
I have created and published fields, dashboards, etc. and they are not displaying in Matik.
- Ensure the worksheet is published with the recent changes. If they still haven't appeared, this is another Tableau bug. New fields/ content will usually appear within 24 hours.
-
No workbooks or worksheets will load after selecting my Tableau Datasource.
- This is usually the result of a timeout due to too many views having to load from Tableau. This can be resolved by reducing the number of Tableau Views and worksheets that are accessible to the Tableau user used for Matik.
-
I am having trouble retrieving workbooks in the dropdown.
- If you have over 20k workbooks contact your TAM for a workaround.
-
I am not getting any values returned from Tableau when I Test API or generate a presentation.
- Ensure your filtering is set up correctly. Please note the Tableau API only supports the = operator. See above for more filtering information.
[Beta] Tableau Embed API Integration
The Tableau Embed API integration is currently in beta. Contact your Technical Account Manager if you would like to opt in to the beta.
To connect a Tableau Embed API data source, see the Connecting to BI Tools (Tableau, Looker, Microsoft Power BI) article.
Introduction to the Embedding API
This integration connects to Tableau's Embedding API. This API allows Matik to:
- Display an embedded preview of your Tableau dashboards and/or worksheets
- Interact with and set Tableau filters and parameters
- Pull data from Tableau dashboards or views
- Export images (either as native Tableau exports or a screenshot)
NOTE: Tableau functionality that is not exposed via the API is not supported by Matik's integration. Currently, this includes Story sheets, set controls or other controls that are not surfaced as standard Tableau filters or parameters, or dashboards interactions that only modify the internal workbook state.
Setting up Tableau Embed API Dynamic Content
The basic process for setting up Tableau Embed API Dynamic Content is:
- Select your DC type (all DC types are supported)
- Select a workbook
- Select the worksheet to pull from
- Select what you’d like to pull from this worksheet:
- A view
- An entire dashboard (Image DC only)
- If desired, apply any Default Dashboard Filters. These are always applied at generation, regardless of end user input.
- Configure any end user filters that users should be able to apply on generation. There are two ways to do this:
- Expose Dashboard Filters to End Users — end users interact directly with the Tableau dashboard to set filters at generation time.
- Advanced Filters — end users fill out a Matik inputs form, and those values are passed to Tableau as filters at generation time.
See the sections below for more detail on each of the steps.
DC Output Types
Tableau Embed API DC can be used to pull images of a dashboard/view or to output tabular data.
Output an Image of a Dashboard/View
- Select Image DC
- Select the dashboard OR view you want to screenshot
- Define any desired filters (see the sections below for more detail)
The DC will output a screenshot of your selected view or dashboard.
Image Export Methods
By default, Matik exports the image using Tableau's native Download functionality. This corresponds to the output you would receive if you clicked Download in Tableau's own UI, and it includes the entire selected dashboard or view.
If a visual does not come out the way you expect, enable Export as screenshot. Matik then captures the dashboard as it appears on screen, rather than asking Tableau to export it.
Screenshot capture has two limits to be aware of:
- It includes only what is visible on screen, so anything you would have to scroll to see is left out.
- When you pull a specific view from a dashboard, it captures that view on its own. Legends and titles placed elsewhere in the dashboard are not included.
Image Shape and Resolution
Matik picks the resolution for you. Images are rendered at enough pixel density to stay sharp when they are scaled onto a slide.
Use the Image Shape field in the dynamic content form to control the shape of the image. What the field offers depends on how the dashboard's author sized it in Tableau.
- Sized automatically: the dashboard fills whatever shape it is given, so you pick one: Widescreen (16:9), Landscape (3:2), Standard (4:3), Square (1:1), or Portrait (4:5). Choose the shape that suits the slide the image goes on.
- Fixed to a size: the dashboard is drawn at its own proportions whatever Matik asks for, so the field names the dimensions it will use. Change the dashboard's size in Tableau to change the shape.
- Set to a size range: the image is kept within the author's bounds, and the field names those bounds.
Custom appears when the content's shape does not match one of the presets.
The Image Shape field is not shown when you pull a specific view from a dashboard. A view takes its shape from its position in the dashboard, so there is nothing to choose. Resolution is still handled automatically.
How the Image Fills Its Placeholder
Matik sizes the image to the height of the image placeholder you tagged and centers it there, so the image occupies the vertical space your template set aside for it. The width follows from the image's own proportions.
Where matching the height would make the image more than 20% wider than the placeholder, Matik scales it to sit entirely inside the placeholder instead, so it cannot cover whatever sits beside it on the slide. This happens most often when a wide dashboard is tagged into a tall, narrow placeholder. If you want the image to fill that placeholder, author the dashboard at that shape in Tableau.
Note: Refreshing a deck through the Chrome extension keeps each image's existing placement. Generate the presentation again to apply this sizing.
Note: This sizing applies to Tableau Embed API image content. The Tableau REST API integration and other data sources are not affected.
Output Tabular Data
- Select any non-Image DC type
- Select an individual view or worksheet (you cannot select an entire dashboard in this case)
- Define any desired filters (see the sections below for more detail)
The DC will output the tabular data that powers your selected view or worksheet.
Working with Filters
Tableau Embed API DC supports two distinct types of filtering, which serve different purposes and apply at different points in the workflow.
- Default Dashboard Filters are configured by the admin at the DC level. These are default query settings that will apply without requiring any end user action.
- End user filters are configured at the DC level but applied at the point of generation, based on input from the end user. These give end users control over what data appears in their generated content.
See the sections below for more detail.
Default Dashboard Filters
Admins can set default Dashboard Filters are by interacting with the embed preview in the DC form. You can see the data update live within the preview as you set the filters.
Saved Default Dashboard Filters are displayed in the “Dashboard Filters” section of the DC form. The filters listed here are what will always be applied on generation. You can clear them by clicking the “x.”
If you also allow end user filtering, default dashboard filters are treated as a default, but can be overridden by end user selections.
End User Filters
These filters allow users to customize the data in their generated content at the point of generation. There are two strategies to choose from. These options are mutually exclusive — you can enable one or the other, but not both.
Option 1: Expose Tableau Dashboard Filters to End Users
When this option is enabled, end users are presented with an interactive preview of the Tableau dashboard at generation time. They can set filters directly on the dashboard (just as they would in Tableau itself), and those filter selections are applied when the content is generated.
This option is best when:
- You want to replicate the native Tableau filtering experience within Matik
- You want minimal setup overhead — no additional filter configuration is required in Matik beyond enabling this option
To use this filtering method, enable the "Let end users view and set dashboard filters" setting. (Note: if you're creating a brand new DC, you will need to save it before you can enable this setting.)
Option 1: Advanced Filters
Advanced filters are defined by selecting a field in the dashboard and then entering a value to compare that field against. The value you enter can be plain text, or you can reference a Matik input with &: notation.
Advanced filters support:
- Categorical Filters: filtering on discrete values (a list of specific values) or categories (e.g., regions, product names, categories). For example: Filtering a “Region” field to show only "Americas" and "Europe", or filtering a "Product Category" field to show only "Technology" and "Furniture".
- Range Filters: filtering data within a specified range of values, typically for continuous fields like numbers, dates, or measures. For example: filtering sales data to show only transactions between $1,000 and $10,000, or filtering dates between January 1, 2020 and December 31, 2022.
- RelativeDateFilter: allows for filtering dates relative to an anchor point or current date. For example: Filtering to show "Last 30 days", "This quarter", "Previous year", or "Next 2 weeks". These filters automatically adjust as time progresses.
- This option is best when:
You want more control over exactly which filter options are exposed to end users
You want to use Matik input features like default values, input mapping, or dependent inputs
If a default dashboard filter and an advanced filter would conflict with each other, the advanced filter will always take precedence. For example, say you set a dashboard filter to "Region = North," but then you also set an advanced filter to "Region = &input." The Region = &:input filter is what would ultimately be applied on generation.
Advanced filters only work on fields that have been explicitly added to the Filters shelf for the selected view or dashboard in Tableau. If you set an advanced filter on a field that is not set up as a filter in Tableau, generation fails with an error naming the field. See Tableau's documentation on adding fields to the Filters shelf.
For example, take this example Tableau view:
In this example:
- ✅ The Date field is connected to a filter for this view. You can verify this by confirming that it appears in the Filters section in Tableau.
- ❌ The MONTH(Date) field is not connected to a filter for this view. You can tell because it is not listed under Filters.
Filtering on Date restricts the results that are output. Filtering on MONTH(Date) returns an error.
Working with Tableau Parameters
Tableau workbooks can also include parameters. Tableau parameters are workbook-level variables (a number, date, or string) that can replace a constant value in a calculation, filter, or reference line. They are distinct from Tableau filters, which restrict the data shown in a view. See Tableau's documentation for more detail on this functionality.
For example, a workbook might have a parameter called "Client Name" that feeds into a calculated field like IF [Client] = [Client Name Parameter] THEN .... Changing the parameter's value changes the workbook's behavior.
Matik's Tableau Embed API integration supports working with parameters. If your selected workbook contains parameters, the DC form will display a Workbook Parameters section where you can configure how parameters are populated.
You can select parameters included in the workbook and define how they should be populated. You can map static values, inputs (&:input_name), or dynamic content ({{dynamic_content_name}}) to workbook parameters in the dynamic content form. At generation time, Matik will populate the parameters accordingly.
Limitations
Matik cannot work with functionality that is not exposed via the Embedding API.
- Pulling from Story sheets is not supported.
- Matik does not support set controls (see Tableau documentation for more information on sets.) A set control may appear to function in the live preview, but Matik is unable to save and apply that configuration on generation. (Note that set controls may visually appear similar to standard filters on the end user-facing dashboard. You will likely need to inspect your dashboard setup on the Tableau side to distinguish between Tableau filters, parameters, and set controls).
- Matik does not support filtering on hierarchical fields. (See Tableau Documentation for more information on hierarchical fields).
- Advanced filters can only be applied to fields that are set as filters in the selected Tableau view or dashboard, meaning they have been added to the Filters shelf. Filtering on any other field returns an error at generation, rather than returning unfiltered data. (See Tableau documentation on the Filters shelf.)
- Dashboard interactions that only modify the internal workbook state (as opposed to being set as standard filters or parameters) also cannot be saved by Matik on generation.
Tableau Embed API FAQ
Is there a glossary of Tableau terms?
In Tableau’s terminology:
- A workbook is a container for related visualizations and data connections.
- A view (or worksheet) is an individual visualization within a workbook.
- A dashboard is a container that can display multiple views/worksheets together.
A field describes an individual data column in a Tableau view.
When you pull non-image data from a view, what data should I expect to see returned?
When you select a view, Matik will return the Summary data associated with that view in Tableau. This should match what you see when you go to that view in Tableau, select View Data, and then Summary. Here is Tableau documentation on viewing underlying data for a view/worksheet: https://help.tableau.com/current/pro/desktop/en-us/inspectdata_viewdata.htm#:~:text=The-,Summary,-tab%20displays%20the
How can I return non-image view data in a different format?
You might need your Tableau data formatted in a particular way (for example: to fit in a table, to populate a given chart, etc.)
If you cannot or would prefer not to edit the Tableau worksheet, you can transform the data in a spreadsheet. See Using Google Sheets with Matik with Matik for more detail.
If you have edit permissions in Tableau: depending on your use case and the nature of your data, you may be able to adjust the worksheet itself.
- USING AGGREGATE FUNCTIONS: Use aggregate functions (like SUM, COUNTD, etc.) to aggregate and shape the data in Tableau.
- Ensure the worksheet outputs one row per bucket (e.g., Month or Platform) by using aggregate functions like
SUM/COUNTD/etc., level-of-detail expressions, or table calculations. - If the worksheet outputs multiple rows at the same grain, Matik will not sum
them, so if you go this route, you must ensure the worksheet produces exactly
one row per bucket.
- Ensure the worksheet outputs one row per bucket (e.g., Month or Platform) by using aggregate functions like
- USING CALCULATED MEASURES: When a worksheet includes both "Measure Names" and "Measure Values," we widen Tableau’s “Measure Names”/“Measure Values” pattern into separate columns. (This is the only reshaping that we perform. Matik does not aggregate or pivot categorical dimensions).
- You could use calculated measures that align with Matik's widening.
- Create one calculated measure per segment and place them on Measure Values. For example:
- Users (web):
SUM(IIF([LOGIN_PLATFORM]='web', [Active Users], 0)) - Users (mobile):
SUM(IIF([LOGIN_PLATFORM]='mobile', [Active Users], 0)) - Users (multiple):
SUM(IIF([LOGIN_PLATFORM]='multiple', [Active Users], 0))
- Users (web):
My workbook uses Tableau extensions. Does Matik support this?
Tableau extensions might not be compatible with the Embed API integration. If you experience issues, try disabling the extensions to see if that resolves the problem.
Comments
0 comments
Please sign in to leave a comment.