
Learning objectives:
Install Cursor and understand what it does (and doesn't) do for a Tableau workflow
Set up a local project folder for SQL, Python, and prep scripts
Initialize git so script versions are tracked alongside the dashboard
Resource:
mkdir dashboard-project && cd dashboard-project && git init
cursor .
Learning objectives:
Use Cursor's AI chat to draft a SQL query against a sample sales table
Iterate on a query with follow-up prompts instead of rewriting from scratch
Save the query as a reusable .sql file for your Tableau data source
Resource:
touch queries/monthly_sales.sql
-- Example generated query:
SELECT DATE_TRUNC('month', order_date) AS month,
region, SUM(amount) AS revenue
FROM sales
GROUP BY 1, 2
ORDER BY 1, 2;
Learning objectives:
Understand where a Tableau Prep script step fits in a flow
Use Cursor to write a pandas cleaning script for a Prep script step
Debug a failed script step using Cursor's error explanations
Resources:
# prep_clean.py
def clean(df):
df['region'] = df['region'].str.strip().str.title()
df = df.dropna(subset=['order_date'])
return df
Learning objectives:
Use Cursor to draft a Tableau calculated field formula from a plain-English description
Understand FIXED, INCLUDE, and EXCLUDE LOD expressions well enough to check AI output
Paste AI-drafted formulas into Tableau's calculation editor correctly
Resources
// Revenue per customer, fixed at region level
{ FIXED [Region] : SUM([Revenue]) / COUNTD([Customer ID]) }
Learning objectives:
Install and start a local TabPy server
Connect Tableau Desktop to that server
Use Cursor to write a Python function called from a Tableau calculated field
Resources:
pip install tabpy
tabpy
// Tableau calculated field
SCRIPT_REAL("return (_arg1 - np.mean(_arg1)) / np.std(_arg1)", SUM([Revenue]))
Learning objectives:
Authenticate against the Tableau REST API using a Personal Access Token
Use Cursor to write a Python script that publishes a workbook
Trigger an extract refresh from a script instead of clicking through the UI
Resources:
import tableauserverclient as TSC
tableau_auth = TSC.PersonalAccessTokenAuth(token_name, token_secret, site_id)
server = TSC.Server(server_url, use_server_version=True)
with server.auth.sign_in(tableau_auth):
wb_item = TSC.WorkbookItem(project_id=project_id)
server.workbooks.publish(wb_item, workbook_path, TSC.Server.PublishMode.Overwrite)
server.workbooks.refresh(wb_item.id)
Learning objectives:
Combine every prior lesson into one workflow: query, clean, calculate, build, publish
Use Cursor at each handoff point instead of just at the start
Produce a finished regional sales dashboard, published and refreshing automatically
Resources:
python run_pipeline.py --step query
python run_pipeline.py --step clean
# (build the dashboard manually in Tableau Desktop here)
python run_pipeline.py --step publish
Learning objectives:
Recognize when Cursor's output needs correction versus when it's trustworthy
Apply prompting patterns that produce better SQL/Python/formula drafts
Know the common failure points across this course's Cursor+Tableau workflow
Resources:
Debugging prompt template:
I ran [command/script] and got this exact error: [paste error].
Here is the relevant code: [paste code].
What's the most likely cause?
Learning objectives:
Understand what Tableau Parameters are and when they beat a plain filter
Use Cursor to draft a parameter-driven calculated field
Wire up a parameter action so clicking the dashboard changes the parameter
Resource(s)
lesson-09-commands.txt:
// Top-N calculated field driven by a parameter
RANK(SUM([Revenue])) <= [Top N]
// Parameter action setup:
// Worksheet > Actions > Add Action > Change Parameter
// Source sheet: (the sheet users click)
// Target parameter: [Top N]
Learning objectives:
Recognize the most common causes of a slow Tableau dashboard
Use Cursor to rewrite an inefficient SQL query
Understand extracts vs. live connections well enough to choose correctly
Resource:
-- Rewritten, optimized query example
SELECT order_date, region, SUM(amount)
FROM sales
WHERE order_date >= '2025-01-01'
GROUP BY order_date, region;
// Enable Tableau's performance recorder:
// Help > Settings and Performance > Start Performance Recording
Learning objectives:
Understand why silent bad data is more dangerous than a query that errors out
Use Cursor to write data validation checks in Python
Wire a validation check into the pipeline so bad data blocks publishing
Resource:
# Data validation checks
assert df['order_id'].is_unique
assert (df['revenue'] >= 0).all()
assert df['customer_id'].notnull().all()
def clean(df):
df = _apply_cleaning(df)
run_validation_checks(df)
return df
Learning objectives:
Structure a shared repo so multiple analysts can work on the same dashboard project
Use Cursor to review a teammate's SQL or Python change before merging
Understand how Tableau Server project permissions fit around this workflow
Resource:
git checkout -b fix-revenue-calc
# ... make your change ...
git add .
git commit -m "Fix revenue calc: correct join type"
git push origin fix-revenue-calc
# then open a pull/merge request for review
Learning objectives:
Schedule the REST API publish/refresh script from Lesson 6 to run automatically
Use Cursor to add basic failure alerting to that script
Know where to check when a scheduled refresh silently stops running
Resource:
# crontab entry: run every day at 6am
0 6 * * * /usr/bin/python3 /path/to/publish_script.py
# Failure alerting wrapper
try:
main()
except Exception as e:
requests.post(SLACK_WEBHOOK_URL, json={"text": f"Publish failed: {e}"})
raise
Learning objectives:
Understand what row-level security is and why a single dashboard often needs it
Use Cursor to draft a user-filter calculated field
Test row-level security correctly before publishing
Resource:
lesson-14-commands.txt:
// Row-level security calculated field
{ FIXED [Region] : SUM(
IF [Mapped User] = USERNAME() THEN 1 ELSE 0 END
) } > 0
// Test using Tableau's "View as" feature for:
// - at least one user per region
// - one user with NO mapping row (should see nothing)
Learning objectives:
Know the difference between sharing a Tableau link and embedding a dashboard
Use Cursor to draft the embed code for a web page
Understand the authentication options for embedded dashboards at a high level
Resource:
<script type="module" src="https://.../api/tableau.embedding.3.0.0.min.js"></script>
<tableau-viz id="viz1" src="<dashboard_url>"
width="1000" height="800"></tableau-viz>
// Authentication options, least to most secure for internal use:
// 1. Public embed (no login) -- public data only
// 2. Trusted authentication
// 3. Connected apps / JWT
Tableau license quick reference:
- Creator: full authoring (connect data, build, publish)
- Explorer: interact with / modify existing dashboards
- Viewer: view and filter published dashboards only
Decision guide:
- Solo/small team, no server management desired -> Tableau Cloud
- Existing IT infra / compliance needs -> Tableau Server
- Cursor: start free, upgrade once usage becomes daily
Note: Cursor's pricing changes frequently -- search "Cursor pricing" to check current tiers before deciding.
This course contains the use of artificial intelligence.
Tableau dashboards are built by dragging fields onto a canvas — but everything that feeds that canvas is code: SQL queries, data prep scripts, calculated field formulas, and publishing automation. Most Tableau courses skip that layer entirely, or teach it the slow way: typing every line by hand, hunting forums when something breaks.
This course teaches you to use Cursor, an AI-native code editor, as a pair-programmer for that exact layer — without changing how you build dashboards in Tableau itself.
You'll learn to:
Draft and iterate on SQL queries with Cursor instead of typing them cold into Tableau's plain custom-SQL box
Write repeatable Tableau Prep cleaning scripts in Python, with Cursor explaining errors as they come up
Get AI-assisted help drafting calculated fields and LOD expressions — while still understanding FIXED, INCLUDE, and EXCLUDE well enough to catch a wrong answer
Connect Python analytics directly into Tableau through TabPy
Automate publishing and extract refreshes with the Tableau REST API, authenticated properly with a Personal Access Token
Chain all of it into one real, end-to-end dashboard build — from query to published, auto-refreshing workbook
Every lesson follows the same shape: a real command or script, shown exactly as you'd type it, explained step by step. By the end, you'll have a working Cursor + Tableau pipeline you can reuse on your next dashboard, and a clear sense of where AI genuinely speeds you up versus where your own judgment still has to lead.