PushMetrics can connect to Tableau Online or Tableau Server to download exports of Workbooks, Views and Dashboards in various formats.
The exported files can then be used in subsequent tasks, e.g. to be sent in an email or Slack message.
You can export Tableau workbooks, views and dashboards in the following ways:
Method | Description |
---|---|
Export Workbook PDF |
returns a PDF of the entire workbook (only sheets that are shown as tabs) Options:
|
Export Workbook Powerpoint |
returns a PPTX of the entire workbook (only sheets that are shown as tabs) Options:
|
Export View PDF |
returns a PDF of the selected view Options:
|
Export View CSV |
returns a CSV of the selected view Options:
|
Export View Image |
returns a PNG image of the selected view Options:
|
Export View Crosstab |
returns a crosstab XLSX of the selected view Options:
|
You can pass filters to the view you are exporting to generate a filtered file.
FilterName=FilterValue
, e.g. Region=West
Region=West,Central
&
, e.g. Region=West&Category=Furniture
Region={{ parameter_1 }}
{{ filter_name }}={{ filter_value }}
If a view has Custom Views defined, you can select them to be exported for the Export View Image method. Other methods are currently not supported by the Tableau API.
Custom Views can not be further filtered.
Filtering is sometimes a little tricky as Tableau requires the filter string to be very accurate, in the correct syntax and not everything is possible.
The best way to troubleshoot is directly in Tableau: Open the view you want to filter in your browser (in Tableau Server or Tableau Online) and look at the URL bar. Remove everything right of the ? and type your filter in the syntax Filtername=Filtervalue
, hit enter and see if you get the desired result.
If you can get it to work here, it will work in PushMetrics.
Unfortunately, Tableau only allows filters to be passed on via a simple filter string and not all types of filters are supported.
As of now, the following limitations to filtering are known:
Order Date
instead of DAY(Order Date)
), you still need to use the original field name in PushMetrics.,
and &
will break the filter as they are reserved for separating multiple filters and filter values.City
filter with a value like Portland, OR
), as a workaround, you’d need to replace them in Tableau with a simple calculated field that replaces the special character with a different character.REPLACE(REPLACE([Name],"&","+"),",",";")
with [Name]
being the original filter name.To execute the task, simply click on the Play button.
You can use the exported file in subsequent tasks, e.g. to attach them to an Email or Slack message using the following method:
Method | Description |
---|---|
.export() |
returns a secure file URL of the most recent execution. Filetype depends on selected action. Filename is the block name. Options: Example Usage: Example Output: |
Exported CSV files can be used in Writeback tasks to write the csv contents to a database table.
If a Tableau task with "Export View CSV" action is present, the task will show up as an option in the "Source" input of a writeback task.