Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

powerbi-fixer

БесплатноЗапускает вложенные скриптыНе проверен

Complete SnowConvert Power BI repointing by fixing unsupported queries using LLM-based translation. Triggers: finish repointing, complete pbit migration, fix…

sfc-gh-dflippoот sfc-gh-dflippo★ 35 звёзд на GitHub

Об этом скилле

Fix Unsupported Power BI Queries

Complete the SnowConvert Power BI repointing process by converting "Unsupported" queries to Snowflake-compatible Power Query (M) code.

Important: Snowflake connection details (account, warehouse, database) are automatically extracted from PBIT parameters (SF_SERVER_LINK, SF_WAREHOUSE_NAME, SF_DB_NAME). Do NOT ask the user for these values.

External Scripts

This skill uses external scripts in the scripts/ directory and MCP tool modes:

  • Python scripts: extract-pbit.py, verify-output.py, verify-parameters.py, extract-current-pbit.py, prepare-queries-for-llm.py, reassemble-pbit.py, display-results.py, update-assessment-report.py
  • MCP tool: pbit_repointing (Rust, in the snowflake-migration MCP server) with modes: apply_translations, build_inventory, cleanup

All scripts use only standard library and run cross-platform (macOS / Linux / Windows). Intermediate files live under <project_dir>/artifacts/pbit/ (set via SCAI_PROJECT_DIR env var).

Parameters

Parameter Description Source
<OUTPUT_FOLDER> Project root containing artifacts/ and reports/ Auto-detected from MCP configure → project_dir
<SOURCE_DIALECT> Source SQL dialect for translation Auto-detected from MCP configure → source_language
<SNOWFLAKE_ACCOUNT> Snowflake account identifier Parameter reference in PBIT (SF_SERVER_LINK)
<SNOWFLAKE_WAREHOUSE> Warehouse name Parameter reference in PBIT (SF_WAREHOUSE_NAME)
<SNOWFLAKE_DATABASE> Target database Parameter reference in PBIT (SF_DB_NAME)
<SNOWFLAKE_ROLE> Optional Snowflake role Parameter reference in PBIT (SF_ROLE) — auto-injected if missing

Critical:

  • DO NOT ask the user for: Output folder, source dialect, Snowflake account, warehouse, database, or schema values
  • All values are auto-detected from the MCP session configuration or extracted from the PBIT file

SF_ Parameters May Be Empty*: The parameters in the PBIT file may have no value (empty/null). This is intentional — users fill these when opening the report in Power BI. The skill references these parameters in converted queries, never hard-codes values.

Workflow Checklist

[ ] Step 1: Gather Parameters
[ ] Step 2: Build Ordered Inventory by PBIT File
[ ] Step 3: Process Each PBIT File (One File at a Time)
    [ ] 3a. Clean and Extract PBIT
    [ ] 3b. Verify Parameters
    [ ] 3c. Prepare Queries for LLM
    [ ] 3d. LLM Translation
    [ ] 3e. Apply Translations (MCP tool)
    [ ] 3f. Reassemble PBIT
    [ ] 3g. Update Assessment Report (MANDATORY)
    [ ] 3h. Verify Output
[ ] Step 4: Present Final Summary

Step 1: Gather Parameters

Read the MCP configure response (call configure() with no params if not in context):

  • project_dir → <OUTPUT_FOLDER>
  • source_language → <SOURCE_DIALECT>

Only fall back to asking the user if configure returns no project_dir.

Environment setup: All uv run scripts/ commands below require the project directory to be set:

export SCAI_PROJECT_DIR="<OUTPUT_FOLDER>"

This ensures all scripts write intermediate files to <project_dir>/artifacts/pbit/ rather than the system temp directory.

Step 2: Build Ordered Inventory by PBIT File

Find the SnowConvert report:

find <OUTPUT_FOLDER> -path "*/reports/SnowConvert/ETLAndBiRepointing*.csv" -type f

Build inventory using the MCP tool:

pbit_repointing(
  mode: "build_inventory",
  report_csv_path: "<report_path>",
  output_folder: "<OUTPUT_FOLDER>"
)

This filters for Status = Unsupported, groups by PBIT file, and returns JSON inventory.

STOPPING POINT: Display the inventory:

Found M PBIT files with unsupported queries:

1. A.pbit - 2 unsupported queries:
   - Query "X"
   - Query "Y"

Total: N unsupported queries in M files
Note: All other queries already converted by SnowConvert will not be modified.

Ask for confirmation before proceeding.

Step 3: Process Each PBIT File (Sub-Agent Dispatch)

CRITICAL:

  • Process PBIT files sequentially, one complete file at a time
  • Complete ALL substeps for one PBIT before starting the next
  • ONLY modify "Unsupported" queries — all others remain exactly as SnowConvert converted them

For each PBIT file in the inventory, dispatch a sub-agent with the full context needed to process it autonomously. This preserves main session context.

Sub-Agent Dispatch

For each PBIT file, dispatch a Task with this prompt:

Read and follow plugin/skills/migration/powerbi-repointing/fixer/SKILL.md.
You are running in sub-agent mode — do NOT ask the user any questions.

Context (from parent):
- project_dir: <absolute_path>
- source_dialect: <SOURCE_DIALECT>
- pbit_file: <pbit_file_name>
- pbit_path: <absolute_pbit_path>
- unsupported_queries: <list_of_query_names>
- report_csv_path: <absolute_report_path>
- scripts_dir: <absol
Полный SKILL.md на GitHub

Установить powerbi-fixer в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

reference/llm-translation-guide.mdreference/multi-source-translation-guide.mdreference/teradata-m-query-pattern-samples.mdreference/validate-dynamic-query.mdscripts/_console.pyscripts/display-results.pyscripts/extract-current-pbit.pyscripts/extract-pbit.pyscripts/prepare-queries-for-llm.pyscripts/reassemble-pbit.pyscripts/update-assessment-report.pyscripts/verify-output.pyscripts/verify-parameters.py

FAQ

Что делает скилл powerbi-fixer?

Complete SnowConvert Power BI repointing by fixing unsupported queries using LLM-based translation. Triggers: finish repointing, complete pbit migration, fix unsupported queries, power bi snowflake migration.

Как установить скилл powerbi-fixer?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл powerbi-fixer запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить powerbi-fixer с