Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scripts or plug-ins for Tableau?

Can one write plug-ins for Tableau? Is Tableau equipped with any sort of general-purpose scripting language?

e.g., for generating visualizations that cannot be created using the default Tableau tools, or for doing k-means clustering on a dataset using various metrics, etc...

like image 777
Kevin H. Lin Avatar asked Sep 12 '13 03:09

Kevin H. Lin


People also ask

Is there scripting in Tableau?

Version 2019.3 and later: You can run published flows that include script steps in Tableau Server. Version 2020.4. 1 and later: You can create, edit, and run flows that include script steps in Tableau Server.

What programming language is used in Tableau?

Programming Language: Tableau SDK can be implemented using any of four languages from C, C++, Java and Python. In case of Python, Tableau SDK only supports Python 2 and doesn't work with Python 3. So if you have Python 3, you will need to install Python 2 to be able to use Tableau SDK libraries.

Can Tableau use Apis?

Tableau Server provides an application programming interface (API) that lets you programmatically manage users, workbooks, data connections, and other resources on the server.


2 Answers

Tableau has several extension points at the moment.

  • If you publish to Tableau Server, On-Line or Public, then you can use Tableau's JavaScript API to interact between your web app client and the Tableau visualization. Your javascript can be notified of events in the Tableau viz, and also effectively command it.
  • Instead of using the JavaScript API, you can include URL query parameters to pass filters, adjust the sizes and control a few other aspects. Similarly, you can append a format string like ".png" or ".pdf" or ".csv" to request a static snapshot in a particular format instead of an interactive object. You can't control as much via the URL as you can via the Javascript API, but the URL approach is very simple and easy for common cases.

  • With both Tableau Server visualizations and Tableau desktop visualizations, you can create URL actions, so that users can select data and then cause HTTP GET requests to URLS that are based on info in the selected data.

  • If you have a data source that Tableau doesn't yet provide a driver for (there are many including ODBC), then you can write a program using their data extract API to extract data from your custom source and make it available to Tableau. You can also publish that source to Tableau server as frequently as needed to keep your visualizations current.

  • If you have specialized functions on your database server, you can access them from Tableau calculations using their SQL pass through functions. You can also define a Tableau connection using arbitrary custom SQL which gives you another place to insert customizations.

  • Version 8.1 added integration with R so you can call R scripts from Tableau calculated fields.

  • Version 8.2 added a REST API to Tableau Server for administrative functions

  • Version 9.1 adds a Web Connector that is designed to let you provide custom code to connect to web accessible data sources

  • Version 10.1 Tableau added TabPy a local HTTP Python server that lets you execute Python functions from Tableau in the same way you can call R functions. The same hooks have now been extended to allow calls to Matlab functions.

  • There are also command line programs, tabcmd and tabadmin, that work with Tableau server that you can use to send commands to the server from your own scripts, but the REST API may be more convenient in many cases.

  • Tableau released several open source libraries, tools and examples at https://github.com/tableau One of these libraries, the document API, allows you to programmatically modify some attributes of Tableau workbook files.

  • Tableau released an extensions API in 2018 to allow developers to add custom functionality to Tableau dashboards.

  • Version 2019.3 adds a MetaData API using GraphQL to allow clients to query for information about the fields, types and attributes available in data sources published to Tableau Server's data catalog.

Hopefully, they'll continue to add additional APIs and integration hooks, but those are most of the options available now.

like image 187
Alex Blakemore Avatar answered Oct 21 '22 10:10

Alex Blakemore


At present, Tableau does not support plug-ins and does not provide a general-purpose scripting language.

There is a currently an Idea on the Tableau website to add Ruby as a scripting language which may cover some of the functionality that is required. The Ideas section is regularly reviewed by Tableau's Product Management team and is the best way of suggesting new functionality for Tableau's products.

like image 6
Talvalin Avatar answered Oct 21 '22 09:10

Talvalin