Miguel Vazq
Miguel Vazq

Reputation: 1489

Tableau: can a visualization be created via javascript or other language?

I am trying to create a new visualization (sheet) in a tableau online workbook via javascript API or by another language. Not by using Tableau Desktop or "manual" interaction into Tableau Online.

I know that the JS API allows me to control (filter, display, etc.) existing visualizations, and the SDK can extract data and publish, but my need is to "create" a new visualization into an existing workbook.

Is there a way to do this?

Upvotes: 1

Views: 1025

Answers (2)

ACT
ACT

Reputation: 56

I explain how to do what you're asking on the blog post linked below. You can use Python with Jinja2.

The basics ...

  1. Create a template of your XML.
  2. Put in the necessary Jinja2 templating language code into your template as placeholders for the data and XML that needs to be rendered by Jinja2. You can render data conditionally as well.
  3. Create a CSV file that specifies what the Python program needs to know to create your workbooks.
  4. Run your Python application to generate a TWB file based on your template and input file. You can also easily create TWBX by zipping the TWB and data together.

The link gives code examples and an example CSV file for specifying your input.

https://www.linkedin.com/pulse/create-tableau-visualizations-programmatically-allan-thompson

Upvotes: 2

Bernardo
Bernardo

Reputation: 3318

The only methods of creating Tableau content that I'm aware of is using Tableau Desktop or Web authoring of something that is already published.

Upvotes: 3

Related Questions