query-tableau-data
Why Tableau?
Tableau is a repository of data sources and visualizations that represent the "last mile" of analytics in an organization. When business users think about company data they often think of a visualization or data set on the BI platform, curated to their needs with useful semantics instead of raw data in a warehouse.
The visual context built on top of data sources shapes this otherwise raw resource into something more consumable and actionable for people. Tableau is good at enabling all kinds of users to be productive with data and it thus contains a diversity of perspectives you will not find elsewhere in the data stack.
To query Tableau, you must first explore the data catalog ideally in a Read-Evaluate-Print Loop (REPL) such that you can quickly iterate over different approaches to find the datasources and views you need. You can query data from views directly but querying datasources gives you more flexibility and access to the full dataset, at the cost of having to understand the schema and construct your own query logic. This information can be derived from the view layer and then formalized as a more robust query against the datasource with additional filters, aggregations, or calculations as needed.
Workflow (REPL-first)
Explore the data catalog and reason through your task using a REPL tool. This workflow is inspired by research on Recursive Language Models, which shows that holding large inputs as REPL variables — rather than loading them into the context window — scales beyond context limits. Recursion (e.g., sub-agent delegation) is implemented by individual harnesses, not by this skill itself.
RULE: Do not write files for exploration. Run
uv run python -c "..."directly. Writing exploration code to disk is a exploration workflow anti-pattern. Usescripts/only to formalize a reusable workflow after REPL exploration is complete.
Hold catalog, schema, and query results as Python variables inside a Session, and surface only printed summaries to your context window. This keeps information-dense payloads out of the context window, where they degrade reasoning quality on linear-complexity tasks. Only print counts, filtered lists, and small row samples — never full payloads. This loop lets you iterate until you have a clear strategy for next steps in your task.