← Back to guides
beginner8 min2026-04-20

Guide: From Prompt to Working Tableau Files with cwtwb + cwprep

A practical quick-start for teams that want to generate Tableau workbooks and Prep flows with AI, while keeping review and audit simple.

cwtwbcwprepMCPTableau

What this setup gives you

Datacooper uses two engines together. cwtwb generates .twb/.twbx dashboards, and cwprep generates .tfl/.tflx Prep flows.

The key business value is simple: your team gets real files that open directly in Tableau products, instead of temporary screenshots.

Step 1: Install and connect MCP tools

Install both tools in your AI client so prompts can call the generators directly.

# cwtwb
uvx cwtwb

# cwprep
uvx --from "cwprep[mcp]" cwprep-mcp

Step 2: Build dashboard files with cwtwb

Use guided authoring for stable delivery: confirm datasource, choose chart primitives, assemble dashboard zones, then export.

  • Core charts: Bar, Line, Area, Pie, Map, Text
  • Advanced charts/actions: Dual Axis, Heatmap, Scatterplot, URL/Filter actions
  • Recipe charts: Bullet, Butterfly, Lollipop, Calendar, Donut, Bump

Step 3: Build Prep flows with cwprep

Model your cleaning pipeline as nodes, then export to .tfl or .tflx. Keep logic transparent with SQL translation when review is required.

  • Inputs: SQL/Table/Excel/CSV/CSV union
  • Transforms: join, union, filter, calculate, pivot/unpivot, aggregate, rename, type change
  • Output: publish-ready datasource config for Tableau workflows

Step 4: Review before rollout

For marketing demos and pilot projects, this checklist is enough.

  • Open generated .twb/.twbx in Tableau Desktop and confirm layout
  • Open generated .tfl/.tflx in Tableau Prep and run once end-to-end
  • Store prompt + output version together for traceability

Starter prompt you can reuse

Build a weekly sales dashboard pack and a prep flow.

Dashboard side (cwtwb):
- KPI cards: Sales, Profit, Margin
- Trend: weekly sales line
- Breakdown: category bar chart
- Add one filter action from category to trend

Prep side (cwprep):
- Load orders + customers
- Remove invalid rows
- Unpivot monthly columns
- Add margin calculation
- Output final datasource files