How to collect data from Tableau
This article provides details on how to create a Metric (Dimensioned / Undimensioned) or a Report using a Tableau Plug-in as a data source.
- Establish connectivity with Tableau:
2. [For Dimensioned Metrics]: First, create a Dimension with values sourced from Tableau
Use Case: Create a MI element from this Tableau Workbook
We want to use this Tableau workbook to create a Metric in MI. This Metric should show the difference in median price from month to month and should be dimensioned by counties the same way as on this workbook.
1. Start by creating a new element (our example is for a Dimensioned Metric)
- Go to New > Metric
- Define this Metric's Measure. If you do not see the measure that you want to use, you can create one directly from this drop-down list
- Select the Measurement Interval that applies to your element
- [For Dimensioned Metrics]: In this example we are creating a dimensioned Metric, so we specify a Dimension with values sourced from the specific Tableau report. For more details refer to: Create a Dimension with Values collected from Tableau
- Click Next: define details
2. Full Editor displays the Data Collection tab
- Select the Tableau connection profile serving as a Data Source for this Metric
- Set the Data Collection Trigger which is going to initiate data update in this Metric
- Tableau Worksheet: Define the Tableau Report to be used for creating Dimension Values in MI. Tableau plugin uses 2 level object hierarchy: [Tableau Workbook name]/ [Tableau Worksheet name]. NOTE: It should be the same Tableau view you have used when creating a Dimension.
- You may pre-filter Tableau data before fetching it to your Metric. For more details, see: How to find Filter names in Tableau
3. Constructing a Plugin Command
- Input Plugin Command manually (you may reference a table with parameters below) or use a Visual Editor (recommended). The Tableau Query Builder allows constructing commands without the need to learn the plugin syntax and avoiding typos/mistakes
- Select Fields and set Aggregation
NOTE: Enter the Last Measurement Time when requested.
4. Plugin commands
The query must include the columns, listed in the hint box to the right of the Plugin command field:
- MI dimension (for dimensioned Metrics and Reports only);
- measurement datetime
- measurement value
- Entire field names that contain special characters, aggregation and commas must be enclosed in quotes (single or double).
- It is acceptable to enclose all fields and values in quotes.
[…] + Notation is used to signify that the MIQL parts of a statement are optional/can be repeated.
5. Plugin command will be validated and data collected on Save from Visual Editor
If entering plug-in command manually,
- Validate plug-in command button
- Collect Data
- Enable and Publish