In this section
- API Version 1 (Implemented in Tableau 2020.1+)
Use the Tableau Analytics Extensions REST API to extend Tableau calculations dynamically to include popular data science programming languages and external tools and platforms.
© 2003-2021 Tableau Software, LLC, a Salesforce Company. All Rights Reserved. On the 25th of February, Tableau released their 2020.1 version, offering us a lot of interesting new features; in this blog article we are going to run through them and take a special look at the new dynamic parameters and viz animations. Tableau 2020.1 new features. Tableau Desktop. Dynamic Parameters; Viz Animations; Spatial.
API Version 1 (Implemented in Tableau 2020.1+)
The methods in this section are implemented in Tableau products as of version 2020.1. In Tableau Desktop, the ‘Test Connection’ button in the Analytics Extension connection dialogue will call the /info method to determine if authentication is required and test if the analytics extension can be connected to succesfully. When SCRIPT_X calculations execute in Tableau Desktop and Server they call the /info and the /evaluate methods to establish authentication and evaluate the code or function call.
Latest Version Of Tableau Desktop
Get static information about the server. This is used for Tableau to understand how the analytics extension is configured. It returns data about the service, such as whether authentication is required. It helps Tableau understand what’s sitting on the other side and what Tableau should be passing.
Tableau Desktop 2020.2 Download
For a successful call:
- Status: 200
Tableau Desktop 2020.1.5
|String that is hard coded in the |
|Creation time in seconds since 1970-01-01, hard coded in the |
|State file path of the server.|
|The server version tag. Clients can use this information for compatibility checks.|
|The server instance name. Can be edited in |
|Collection of API versions supported by the server. Each entry in the collection is an API version which has a corresponding list of properties.|
|Set of properties for an API version.|
|Set of an API’s available features.|
|Set of a feature’s properties. For specific details for a particular property meaning of a feature, check the documentation for the specific API version.|
|If true the feature is required to be used by client.|
When authentication is enabled for v1 API
/info call, the response contains the authentication feature parameter, e.g.:
v1 authentication specific features (see the example above):
|Authentication is never optional for a client to use if it is in the features list. Both settings of true or false will result in a requirement for authentication.|
|List of supported authentication methods with their properties.|
|HTTP basic authentication.|
Executes a block of code, replacing named parameters with their provided values. The Evaluate endpoint is where all of the analysis using the service is done.
The expected POST body is a JSON dictionary with two elements:
- data: a value that contains the parameter values passed to the code. These values are key-value pairs, following a specific convention for key names (_arg1, _arg2, etc.). These take dimensions and measures from Tableau and pass them to the external service.
- script: a value that contains one or more lines of code or instructions for the analytics extension. Any references to the data or parameter names will be replaced by their values according to data. It defines the instructions about what the external service should execute. For example, a Python script, the name of a remote process or function, a script in another language, or it could be empty if the service just performs a single function.
Tableau expects the /evaluate method to return either:
Tableau Desktop 2020.1.0
- exactly 1 value which is then copied to each row in the table behind a viz.-or-
- a collection of the same size as there are rows in the input data.
If a scalar value is returned, that value will be assigned to the calculated field in Tableau for each row in the field.
If an array response is returned, the number of elements in the array must exactly match the number of rows in the calculated field that the response will be assigned to. Usually, this is done by sending from Tableau an array with the right number of elements as an input parameter in the /evaluate request body. The Analytics Extension should then return an array of the same size as the input parameter.