feat: add /star-schema-advisor slash command and tableau workbook parser#3537
feat: add /star-schema-advisor slash command and tableau workbook parser#3537GabyRangelB wants to merge 1 commit intomainfrom
Conversation
Consolidates three parallel efforts into a single solution for triaging Tableau calculated fields into dbt mart changes and a semantic layer queue. Components: - scripts/tableau-analyze-workbook.py: parses twb/twbx XML, emits structured JSON with field metadata, viz usage, LOD detection, and parameters - .claude/commands/star-schema-advisor.md: 8-step interactive workflow with 4-bucket hybrid verdict system and analyst approval gate - 21 passing tests covering zip extraction, dedup, field filtering, calc name resolution, viz usage tracking, LOD detection, and integration Closes #3513 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @GabyRangelB's task in 5m 6s —— View job Code Review:
|
| # | Severity | Location | Issue |
|---|---|---|---|
| 1 | Critical | tableau-analyze-workbook.py:56,64 |
Unhandled StopIteration from bare next() on zip namelist |
| 2 | Important | tableau-analyze-workbook.py:488–504 |
find_workbook_id_by_name() is dead code |
| 3 | Important | tableau-analyze-workbook.py:71,78,103,222,372,538 |
Untyped XML element and Namespace parameters |
| 4 | Important | tableau-analyze-workbook.py:39,512 |
Relative EXPOSURES_PATH, missing encoding= on read_text() |
| 5 | Important | test_tableau_analyze_workbook.py:25 |
Inline import inside function body |
| 6 | Important | test_tableau_analyze_workbook.py:14–16 |
Relative test paths, location-sensitive |
| 7 | Important | tableau-analyze-workbook.py:302 |
-> dict | None return type too loose |
| 8 | Minor | .claude/commands/star-schema-advisor.md |
File deleted in working tree — deliverable incomplete |
| 9 | Minor | tableau-analyze-workbook.py:469–472 |
Silent pass on signout failure with no log |
| 10 | Minor | tableau-analyze-workbook.py:576–586 |
Redundant str() cast on typed caption |
| 11 | Minor | tableau-analyze-workbook.py:283,304 |
XML parsed N+1 times |
| 12 | Minor | tableau-analyze-workbook.py:71–75 |
_is_internal docstring vs. implementation mismatch |
Items 1 (runtime crash on malformed .twbx) and 8 (slash command deleted, primary deliverable missing) should be resolved before merge.
Pull Request
Summary & Motivation
Add the
/star-schema-advisorslash command andtableau-analyze-workbook.pyscript, consolidating three parallel efforts (#3513, PR #3508, and an
uncommitted handoff session) into a single solution for triaging Tableau
calculated fields into dbt mart changes and a semantic layer queue.
Components:
scripts/tableau-analyze-workbook.py— Parses.twb/.twbxXML, emitsstructured JSON with field metadata, viz usage (dimension vs measure per
worksheet), LOD detection, and parameter extraction. Supports both local file
(
--file) and Tableau Server API (--exposure) input modes..claude/commands/star-schema-advisor.md— 8-step interactive workflow with4-bucket hybrid verdict system (move upstream / existing mart for Cube / new
mart for Cube / stay on Tableau) and analyst approval gate before dbt changes.
docs/superpowers/specs/2026-03-27-star-schema-advisor-design.mdworkbooks/gitignored drop folder for.twbxfilesdocs/superpowers/star-schema-reports/directory for audit trail reportsAI Assistance
Co-authored with Claude Code. Human-directed: requirements, approach selection
(Approach B: thin script + rich slash command), 4-bucket verdict taxonomy,
dual extraction mode decision. AI-assisted: script implementation, test fixtures,
slash command workflow prose, design spec drafting.
Self-review
General
TEAMster Asana Project
feedback; dismiss false positives with a brief reply explaining why.
CI checks