Stop scheduled Extract Refreshes in Tableau and spare your database. This repository contains a set of Tableau api calls in Python with requests library to collect all dashboards with a specific tag and bulk refresh them in an Airflow pipeline.
Use the Python Operator to execute the Python callables (tableau.py) in key points of your Airflow data pipeline (dag.py). This way you can ensure that your Tableau dashboards are automatically updated on a regular basis. This is crucial for keeping visualizations current with the latest data.
- Python 3.7 or above
- Airflow instance
- Generate a Tableau token and store it as a Variable in Airflow UI
- Simply tag your dashboard with the name of the pipeline (or whatever was agreed with your Data Engineer) where dashboard should be triggered.
- A dashboard can be refreshed in several Airflow pipelines, thus multiple tags can be assigned.
- A Tableau token should be created per pipeline to avoid concurrent connections.