Making the most of Tableau's REST API with Python and Pandas
Вставка
- Опубліковано 19 тра 2024
- Pandas is an excellent choice for working with data in Python. This tutorial demonstrates how the functionality of Pandas helps us make the most out of Tableau's REST API. We'll look at filtering, joining, and outputting data via Pandas.
We'll be using tableau-api-lib to communicate with our Tableau Server, and this also works for Tableau Online.
To make sure you have all the latest features, update tableau-api-lib:
pip install -U tableau-api-lib
Getting started with tableau-api-lib:
• tableau-api-lib (blitz...
Join the Tableau Developer Program to get involved. It coms with a free Tableau Online developer site!
www.tableau.com/developer
Hi Devyx, your videos are really useful. I just have a request, is there a way to get licensing information from tableau server using phyton? For eg:- 45/75 viewer 35/80 Explorer. I am looking for a way to automate it, thank you!
You have any material of Tableau Cloud, like extract the groups/users using python?
Could you please make video for appending data from excel file to tableau datasource on tableau server using python libraries
Hii Devyx .. Recently I was working upon some excel sheets I was told to automate them using python .. I needed to color some cells through some programing logic I easily did that using python but now I am told to do same thing in tablaeu itself without downloading any csv from workbook
Can you please help me how do I do that 🙏
There are probably many ways to solve what you're looking for, here is one result from searching for "conditional formatting Tableau":
How to Conditionally Format Text Cell Color in Tableau
UA-cam · Anthony B. Smoak
12 Aug 2017
Hello thank you for this video, can we use Tableau's Rest API to store dashboards directly to S3 AWS ?
The REST API will allow you to download the files. If you download a workbook, it is ultimately downloaded as a zip file. You would then need to write the additional code to upload those zip files to your S3 bucket. That should be fairly straightforward, given the libraries out there for Python and AWS.
@@devyx thank you for your feedback, I'm a beginner, do you know please what are the libraries for AWS and python?
@@ChaimaOueslati-iu4lj looks like boto3 is what you want, here is an example of uploading to an S3 bucket
boto3.amazonaws.com/v1/documentation/api/latest/guide/s3-uploading-files.html
@@devyx Thank you Sir for you help, I have one last question please: in the code part config can we only use username and password for authentication or we must connect only with personal access token name and token secret, if this is the case how we can determine the personal access token name and personal access token secret please
@@ChaimaOueslati-iu4lj this article walks through how to use PATs for auth:
link.medium.com/mlnSSl2SEwb
Hi, is there a way to add multiple filters to the view by generating a dict ?
Yes, you can see it in action in the "Querying Tableau views with filters and parameters" tutorial video.
@@devyx Thanks for your response. As I have multiple reports, trying to generate different param_dicts and apply it to the views. It doesn't seem to be working. Would you have time to help me out here if I provide more details?
@@pavan7771 go ahead and post what you're trying to filter, if the use case fits with what the REST API supports I'll try to point you in the right direction.
@@devyx Thanks, sorry for the delayed response. I have to loop through individual values of a couple column and generate a pdf for each value of the column. I tried to generate the parameter_dict dynamically, but no luck. Shall I share the code here?
@@pavan7771 if the values you need to iterate over are embedded in some combination of rows and columns, I recommend building a preliminary stage in your workflow where you parse that data and store those values into a single iterable object. You can then do a for loop over that iterable and each loop will make the necessary API calls to generate a PDF for the params relevant to that loop.
If you or someone on your team is savvy in Python, this is quite doable.
Ultimately you just need to create multiple versions of your paramerer_dict and use each one to query the API.