Connect Streamlit to Tableau
Introduction
This guide explains how to securely access data on Tableau from Streamlit Cloud. It uses the tableauserverclient library and Streamlit's secrets management.
Create a Tableau site
If you already have a database that you want to use, feel free
to skip to the next step.
For simplicity, we are using the cloud version of Tableau here but this guide works equally well for self-hosted deployments. First, sign up for Tableau Online or log in. Create a workbook or run one of the example workbooks under "Dashboard Starters".
Create personal access tokens
While the Tableau API allows authentication via username and password, you should use personal access tokens for a production app.
Go to your Tableau Online homepage, create an access token and note down the token name and secret.
