Getting filtered/aggregated data from Tableau Server via REST API from custom page - rest

I have existing Tableu Server workbook with diagrams and own datasources(mysql).
Is it possible to fetch data from Tableau Server via Rest Api, e.g. if I build a custom web dashboard and need only data from Tableau?
I am interested in Tableaus ability to filter/aggregate data, thats what it does for its diagrams, would be great to harvest it from custom Python web page for my custom diagrams (e.g. for D3 or Highcharts).
Is "Extracts API" the right direction for this?
Or the path with "Query View Data" is the solution?

If you want to specify the filter values and get the exact set of data that your diagrams/workbooks are using, go with the Query View Data solution.
If you pull the data from the extract, you will get it exactly as it is out of the extract. This means if you have filters or aggregation done in your visualization (which is processed after the extract), it won't apply to the extracted data.

Related

How to connect API as data source in Tableau?

I need to use two data sources. One is SQL and another one is the response from a rest API.
I tried to implement WDC, but it needs an HTML and user need to interact with UI and getting the response.
But I don't want to create a html page.
Is there any way to use an API response as a data source in Tableau?
The short answer is that you can not use API directly as a data source but you should build a pipeline to transform this into flat-file o populate a database table.
The alternative answer is to use Python to connect to the REST API. You can choose to use TabPy or follow some pre-build solution like this one. Personally, I don't know how the performances could be.

Difference between ways of sharing dashboard in power bi report server(on-premises) like embed or api or url access or wmi provider or report viewer

i write an web application for wrapping power bi report server web portal(on-premises),my users have access to folders or category items(all of kind such data source) without seen the web portal and they see my user interface.
i want to integrated dashboard in my ui. the simple way is embed by adding "?rs:embed=true" to end of url of that report url.
our database are so huge and full of data(average 5 million rows for each table) and when i embedded it this may take a time for rendering.
i wanna better way to integrated my dashboard or report or kpi with best time to rendering.
we have few solution for this like urlaccess or wmi provider or report view control or rest api.which one is better? and have more less time of loading reports?
can i simulate a backend system(or client side) like report viewer control for viewing reports directly?
can you show me link for .net core example(code) of this work or like this work?
thanks alot
mohammadreza daneshvar
You can write an intermediate program and the customer can communicate with the Power BI server By your own API. so you can define your access level and customization your dashboard. this way is fast and easy

How to extract view meta data from tableau

I need to extract metadata from view. When I was reading tableau rest API documentation there is no ways mention in the rest api for sheet metadata and also not mention measure and dimension API extraction. If anyone knows the way how to extract data please help me
Take a look at the Tableau Javascript API...specifically the getData method.
The Rest API is used for automating Tableau Server tasks (add users, create schedules, set permissions, etc).
You can embed a hidden extension into your dashboard that can access worksheet, field and filter information. See the docs on extensions here.
Here is a good example of one that could get you started on pulling the worksheet and field information.
Use the Tableau Metadata API - https://help.tableau.com/current/api/metadata_api/en-us/index.html
You can find sample scripts here - https://github.com/tableau/metadata-api-samples

How edit the content of a data extract in Tableau?

I'm creating an extract from a table hosted on MS SQL Server in Tableau.
After I create the data extract, is there any way I can enable the end users to edit the data extract content? Something like an interface?
Thanks in advance
The Tableau Data Extract API (and publicly released products) do not allow you to modify the contents of an extract.
You can append new data rows to an extract, or refresh (i.e. regenerate) an extract.
Think of extracts like datamarts -- read-only snapshots of a portion of some other data store, designed to allow efficient analysis and reporting. They aren't intended to replace databases.
If you want users to make live updates, consider using a database and some sort of tech stack to allow form based updates.
This is called web-authoring in Tableau.
you can publish the extract to server and allow the users to connect to this data source for creating their own reports
using the server version of Tableau this can also be referred as Adhoc Reporting
More Info

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...
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.
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.