bi-superpowers 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +31 -0
- package/.claude-plugin/plugin.json +34 -0
- package/.claude-plugin/skill-manifest.json +79 -0
- package/.mcp.json +13 -0
- package/.plugin/plugin.json +14 -0
- package/LICENSE +21 -0
- package/README.md +849 -0
- package/bin/build-plugin.js +97 -0
- package/bin/cli.js +891 -0
- package/bin/commands/autoupdate.js +128 -0
- package/bin/commands/build-desktop.js +368 -0
- package/bin/commands/create-from-template.js +165 -0
- package/bin/commands/diff.js +435 -0
- package/bin/commands/install.js +542 -0
- package/bin/commands/lint.js +441 -0
- package/bin/commands/mcp-setup.js +255 -0
- package/bin/commands/session-update.js +204 -0
- package/bin/commands/smoke-test.js +20 -0
- package/bin/commands/uninstall.js +611 -0
- package/bin/commands/update-check.js +427 -0
- package/bin/commands/validate-cases.js +264 -0
- package/bin/commands/validate-projects.js +426 -0
- package/bin/commands/watch.js +251 -0
- package/bin/lib/agents.js +62 -0
- package/bin/lib/base-template-smoke.js +299 -0
- package/bin/lib/claude-hooks.js +160 -0
- package/bin/lib/generators/claude-plugin.js +529 -0
- package/bin/lib/generators/index.js +116 -0
- package/bin/lib/generators/shared.js +257 -0
- package/bin/lib/mcp-config.js +835 -0
- package/bin/lib/microsoft-mcp.js +206 -0
- package/bin/lib/powerbi-mcp-session.js +140 -0
- package/bin/lib/skills.js +164 -0
- package/bin/lib/template-scaffold.js +366 -0
- package/bin/mcp/powerbi-modeling-launcher.js +42 -0
- package/bin/postinstall.js +50 -0
- package/bin/utils/mcp-detect.js +346 -0
- package/bin/utils/tui.js +314 -0
- package/commands/bi-connect.md +520 -0
- package/commands/bi-dax.md +464 -0
- package/commands/bi-kickoff.md +550 -0
- package/commands/bi-modeling.md +485 -0
- package/commands/bi-performance.md +521 -0
- package/commands/bi-powerquery.md +229 -0
- package/commands/bi-refactor.md +249 -0
- package/commands/bi-scorecard.md +268 -0
- package/commands/bi-start.md +272 -0
- package/config.example.json +23 -0
- package/config.json +23 -0
- package/desktop-extension/manifest.json +30 -0
- package/desktop-extension/package.json +10 -0
- package/desktop-extension/server.js +137 -0
- package/package.json +94 -0
- package/skills/bi-connect/SKILL.md +522 -0
- package/skills/bi-connect/scripts/update-check.js +427 -0
- package/skills/bi-dax/SKILL.md +466 -0
- package/skills/bi-dax/scripts/update-check.js +427 -0
- package/skills/bi-kickoff/SKILL.md +552 -0
- package/skills/bi-kickoff/references/flow.html +78 -0
- package/skills/bi-kickoff/references/flow.md +62 -0
- package/skills/bi-kickoff/scripts/update-check.js +427 -0
- package/skills/bi-modeling/SKILL.md +487 -0
- package/skills/bi-modeling/scripts/update-check.js +427 -0
- package/skills/bi-performance/SKILL.md +523 -0
- package/skills/bi-performance/scripts/install-tabular-editor.ps1 +159 -0
- package/skills/bi-performance/scripts/run-bpa.ps1 +265 -0
- package/skills/bi-performance/scripts/update-check.js +427 -0
- package/skills/bi-powerquery/SKILL.md +231 -0
- package/skills/bi-powerquery/references/base-template-data-contract.md +323 -0
- package/skills/bi-powerquery/references/power-query-standards.md +74 -0
- package/skills/bi-powerquery/scripts/new-powerquery-staging.ps1 +371 -0
- package/skills/bi-powerquery/scripts/test-powerquery-contract.ps1 +225 -0
- package/skills/bi-powerquery/scripts/update-check.js +427 -0
- package/skills/bi-refactor/SKILL.md +251 -0
- package/skills/bi-refactor/references/flow.md +27 -0
- package/skills/bi-refactor/scripts/update-check.js +427 -0
- package/skills/bi-scorecard/SKILL.md +270 -0
- package/skills/bi-scorecard/examples/base-template-scorecard-overlay.json +82 -0
- package/skills/bi-scorecard/scripts/new-scorecard-blueprint-from-base-template.ps1 +124 -0
- package/skills/bi-scorecard/scripts/powerbi-goal-status-rules-api.ps1 +39 -0
- package/skills/bi-scorecard/scripts/powerbi-goal-values-api.ps1 +48 -0
- package/skills/bi-scorecard/scripts/powerbi-goals-api.ps1 +68 -0
- package/skills/bi-scorecard/scripts/powerbi-rest-common.ps1 +197 -0
- package/skills/bi-scorecard/scripts/powerbi-scorecards-api.ps1 +53 -0
- package/skills/bi-scorecard/scripts/update-check.js +427 -0
- package/skills/bi-start/SKILL.md +274 -0
- package/skills/bi-start/scripts/update-check.js +427 -0
- package/src/content/base.md +197 -0
- package/src/content/mcp-requirements.json +57 -0
- package/src/content/routing.md +201 -0
- package/src/content/skills/bi-connect.md +493 -0
- package/src/content/skills/bi-dax.md +437 -0
- package/src/content/skills/bi-kickoff/SKILL.md +523 -0
- package/src/content/skills/bi-kickoff/references/flow.html +78 -0
- package/src/content/skills/bi-kickoff/references/flow.md +62 -0
- package/src/content/skills/bi-modeling.md +458 -0
- package/src/content/skills/bi-performance/SKILL.md +494 -0
- package/src/content/skills/bi-performance/scripts/install-tabular-editor.ps1 +159 -0
- package/src/content/skills/bi-performance/scripts/run-bpa.ps1 +265 -0
- package/src/content/skills/bi-powerquery/SKILL.md +202 -0
- package/src/content/skills/bi-powerquery/references/base-template-data-contract.md +323 -0
- package/src/content/skills/bi-powerquery/references/power-query-standards.md +74 -0
- package/src/content/skills/bi-powerquery/scripts/new-powerquery-staging.ps1 +371 -0
- package/src/content/skills/bi-powerquery/scripts/test-powerquery-contract.ps1 +225 -0
- package/src/content/skills/bi-refactor/SKILL.md +222 -0
- package/src/content/skills/bi-refactor/references/flow.md +27 -0
- package/src/content/skills/bi-scorecard/SKILL.md +241 -0
- package/src/content/skills/bi-scorecard/examples/base-template-scorecard-blueprint.expected.json +105 -0
- package/src/content/skills/bi-scorecard/examples/base-template-scorecard-overlay.json +82 -0
- package/src/content/skills/bi-scorecard/scripts/new-scorecard-blueprint-from-base-template.ps1 +124 -0
- package/src/content/skills/bi-scorecard/scripts/powerbi-goal-status-rules-api.ps1 +39 -0
- package/src/content/skills/bi-scorecard/scripts/powerbi-goal-values-api.ps1 +48 -0
- package/src/content/skills/bi-scorecard/scripts/powerbi-goals-api.ps1 +68 -0
- package/src/content/skills/bi-scorecard/scripts/powerbi-rest-common.ps1 +197 -0
- package/src/content/skills/bi-scorecard/scripts/powerbi-scorecards-api.ps1 +53 -0
- package/src/content/skills/bi-start.md +266 -0
- package/templates/base-template/AGENTS.md +33 -0
- package/templates/base-template/base-template.Report/.platform +11 -0
- package/templates/base-template/base-template.Report/StaticResources/RegisteredResources/BISuperpowers.json +3888 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BaseThemes/CY18SU07.json +177 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BaseThemes/Fluent2-CY26SU03.json +4104 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/AccessibleCityPark.json +26 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/AccessibleDefault.json +26 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/AccessibleNeutral.json +26 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/AccessibleOrchid.json +26 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/AccessibleTidal.json +26 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Bloom.json +139 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/CityPark.json +40 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Classroom.json +40 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/ColorblindSafe.json +48 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/CopilotDefault.json +1861 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Divergent.json +127 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Electric.json +48 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Frontier.json +136 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/HighContrast.json +40 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Highrise.json +41 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Innovate.json +227 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/NewExecutive.json +41 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Solar.json +33 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Storm.json +25 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Sunset.json +48 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Temperature.json +33 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Tidal.json +100 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Twilight.json +40 -0
- package/templates/base-template/base-template.Report/definition/bookmarks/1d40d43c7ade66e8603c.bookmark.json +2297 -0
- package/templates/base-template/base-template.Report/definition/bookmarks/af068ff51c0ca3089ea7.bookmark.json +2300 -0
- package/templates/base-template/base-template.Report/definition/bookmarks/bookmarks.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/page.json +130 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/0352fd80d074693a65db/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/0352fd80d074693a65db/visual.json +669 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/1c5a14bf493697344b68/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/1c5a14bf493697344b68/visual.json +723 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/3486cf7624c5b109b4e5/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/3486cf7624c5b109b4e5/visual.json +333 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/4d8b989008edc0db28d1/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/4d8b989008edc0db28d1/visual.json +109 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/55e10ac7d76a1954f94f/mobile.json +31 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/55e10ac7d76a1954f94f/visual.json +378 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/57f52ecf4490f70e4da1/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/57f52ecf4490f70e4da1/visual.json +175 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/5f4d76bbc870118e9840/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/5f4d76bbc870118e9840/visual.json +468 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/73629e1abebb7a444b59/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/73629e1abebb7a444b59/visual.json +359 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/749cb1388c7e0a88161c/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/749cb1388c7e0a88161c/visual.json +690 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/90677f13cea5d1275990/visual.json +17 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/92cf92e3da10493adb78/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/92cf92e3da10493adb78/visual.json +468 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/9fe17b1971f68443fc15/mobile.json +10 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/9fe17b1971f68443fc15/visual.json +328 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/a30bd0950630ed94e8a3/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/a30bd0950630ed94e8a3/visual.json +578 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/a56e91d9400a835e4814/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/a56e91d9400a835e4814/visual.json +432 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/aded24cd205c0b528642/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/aded24cd205c0b528642/visual.json +801 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/af34b26f14a8a724c9a9/mobile.json +37 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/af34b26f14a8a724c9a9/visual.json +1318 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/b529688fe5a226643322/visual.json +209 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/c4c6f332d05e72e2eb06/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/c4c6f332d05e72e2eb06/visual.json +174 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/fa81f184e2cb0e8b087c/mobile.json +29 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/fa81f184e2cb0e8b087c/visual.json +241 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/page.json +130 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/07e9c4302e29029c5462/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/07e9c4302e29029c5462/visual.json +690 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/109ceede4bc015b0c006/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/109ceede4bc015b0c006/visual.json +468 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/118257e006d472277e10/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/118257e006d472277e10/visual.json +359 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/2caf02e0137c4a1280cc/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/2caf02e0137c4a1280cc/visual.json +669 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/311e76fe3c9edad68204/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/311e76fe3c9edad68204/visual.json +109 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/31c21f8cbeb3b208940a/visual.json +209 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/3ab72c25062437149b03/visual.json +17 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/5959867442abcb0ce2b3/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/5959867442abcb0ce2b3/visual.json +788 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/5b96e0f88d192b044a13/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/5b96e0f88d192b044a13/visual.json +592 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/64e749a63d0786000e22/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/64e749a63d0786000e22/visual.json +468 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/7ae1ca604edac6586ad0/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/7ae1ca604edac6586ad0/visual.json +1310 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/840300733885141a6603/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/840300733885141a6603/visual.json +175 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/a38448cdb203279273d2/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/a38448cdb203279273d2/visual.json +516 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/d1e86f213a3841d12e20/visual.json +328 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/d4a484c1bcc8ee3075e2/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/d4a484c1bcc8ee3075e2/visual.json +432 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/d87cb5cf06acca19bbb5/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/d87cb5cf06acca19bbb5/visual.json +241 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/e243da2677209ed69408/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/e243da2677209ed69408/visual.json +174 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/f3aaf24f5b22b67573b0/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/f3aaf24f5b22b67573b0/visual.json +333 -0
- package/templates/base-template/base-template.Report/definition/pages/pages.json +8 -0
- package/templates/base-template/base-template.Report/definition/report.json +89 -0
- package/templates/base-template/base-template.Report/definition/version.json +4 -0
- package/templates/base-template/base-template.Report/definition.pbir +9 -0
- package/templates/base-template/base-template.SemanticModel/.platform +11 -0
- package/templates/base-template/base-template.SemanticModel/definition/cultures/es-AR.tmdl +11185 -0
- package/templates/base-template/base-template.SemanticModel/definition/database.tmdl +3 -0
- package/templates/base-template/base-template.SemanticModel/definition/expressions.tmdl +234 -0
- package/templates/base-template/base-template.SemanticModel/definition/functions.tmdl +637 -0
- package/templates/base-template/base-template.SemanticModel/definition/model.tmdl +82 -0
- package/templates/base-template/base-template.SemanticModel/definition/relationships.tmdl +271 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Calendario.tmdl +200 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Campa/303/261as.tmdl +75 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Canales.tmdl +84 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Clientes.tmdl +143 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Devoluciones.tmdl +95 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Ejecuci/303/263n proyectos.tmdl" +130 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Entregas.tmdl +122 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Equipos m/303/251tricas.tmdl" +40 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Equipos.tmdl +73 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Horas.tmdl +122 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Interacciones clientes.tmdl +146 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Leads.tmdl +119 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Monedas.tmdl +44 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Movimientos financieros.tmdl +145 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/M/303/251tricas.tmdl +1294 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/N/303/263mina.tmdl +110 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Oportunidades.tmdl +135 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Presupuesto.tmdl +125 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Productos.tmdl +98 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Proyectos.tmdl +77 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Servicios.tmdl +75 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Tareas proyecto.tmdl +102 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Tipo de cambio.tmdl +67 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Ventas.tmdl +180 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux An/303/241lisis dimensiones.tmdl" +38 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Comparaciones.tmdl +227 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Compatibilidad m/303/251trica-dimensi/303/263n.tmdl" +68 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Modelo configuraci/303/263n.tmdl" +44 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Modo fechas.tmdl +36 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux M/303/251trica-Equipo.tmdl" +102 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Overrides m/303/251trica-dimensi/303/263n.tmdl" +54 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Per/303/255odos.tmdl" +182 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Rango fechas modo.tmdl +36 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Rango fechas.tmdl +27 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Vista de calendario.tmdl +30 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_GC C/303/241lculo.tmdl" +70 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_GC Eje X.tmdl +63 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_GC M/303/251trica.tmdl" +374 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_GC Tipo c/303/241lculo.tmdl" +223 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_PC Dimensi/303/263n.tmdl" +98 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_PC Eje X.tmdl +68 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables//303/223rdenes servicio.tmdl" +151 -0
- package/templates/base-template/base-template.SemanticModel/definition.pbism +5 -0
- package/templates/base-template/base-template.SemanticModel/diagramLayout.json +568 -0
- package/templates/base-template/base-template.pbip +14 -0
- package/templates/base-template/template.manifest.json +41 -0
- package/theme/BISuperpowers.json +3888 -0
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
# Base Template Data Contract
|
|
2
|
+
|
|
3
|
+
`templates/base-template/base-template.pbip` is the canonical demo report. It ships demo data only, with `Data = "Demo"` on appendable business tables. The `/bi-powerquery` workflow creates real staging queries in the user's live model through Power BI Modeling MCP and sets `Data = "Real"` there. Do not add those `*_Real` queries to the template source.
|
|
4
|
+
|
|
5
|
+
## Appendable Tables
|
|
6
|
+
|
|
7
|
+
These are the packaged `base-template` Andina Nexus demo tables. Andina Nexus is a broader product-and-services company, not a sales-only sample. In projects generated by `/bi-kickoff`, do not assume these names still exist; discover appendable business tables from the current model instead.
|
|
8
|
+
|
|
9
|
+
The packaged demo queries are organized for teaching clarity:
|
|
10
|
+
|
|
11
|
+
- `Sample Dataset\Dimensiones`: dimension queries such as `Clientes`, `Productos`, `Canales`, `Servicios`, `Proyectos`, `Equipos`, and `Campañas`.
|
|
12
|
+
- `Sample Dataset\Hechos`: fact queries such as `Ventas`, `Oportunidades`, `Leads`, `Movimientos financieros`, `Horas`, `Nómina`, `Ejecución proyectos`, and `Tareas proyecto`.
|
|
13
|
+
|
|
14
|
+
Real staging queries created by `/bi-powerquery` must not go into those packaged sample groups. Use a separate group such as `Real Data` when authoring user-side `*_Real` queries.
|
|
15
|
+
|
|
16
|
+
| Table | Purpose | Relationship contract |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| `Clientes` | Customer dimension | Uses `ClienteId` |
|
|
19
|
+
| `Productos` | Product and serviceable-product dimension | Uses `ProductoId` |
|
|
20
|
+
| `Canales` | Sales, marketing, and service channel dimension | Uses `CanalId` |
|
|
21
|
+
| `Servicios` | Service catalog dimension | Uses `ServicioId` |
|
|
22
|
+
| `Proyectos` | Project dimension | Uses `ProyectoId` |
|
|
23
|
+
| `Equipos` | Internal team dimension | Uses `EquipoId` |
|
|
24
|
+
| `Campañas` | Marketing campaign dimension | Uses `CampañaId` |
|
|
25
|
+
| `Ventas` | Revenue fact | Uses `Fecha`, `ProductoId`, `ClienteId`, and `CanalId` |
|
|
26
|
+
| `Oportunidades` | Pipeline fact | Uses `Fecha`, `ClienteId`, `CanalId`, `ProductoId`, and `ServicioId` |
|
|
27
|
+
| `Leads` | Marketing demand fact | Uses `Fecha`, `CampañaId`, `CanalId`, and `ClienteId` |
|
|
28
|
+
| `Interacciones clientes` | Customer health fact | Uses `Fecha`, `ClienteId`, `CanalId`, `ProductoId`, and `ServicioId` |
|
|
29
|
+
| `Entregas` | Delivery fact | Uses `Fecha`, `ClienteId`, `CanalId`, `ProductoId`, and `ServicioId` |
|
|
30
|
+
| `Órdenes servicio` | Service operations fact | Uses `Fecha`, `ClienteId`, `ProductoId`, `ServicioId`, and `EquipoId` |
|
|
31
|
+
| `Movimientos financieros` | Finance movement fact | Uses `Fecha`, `ClienteId`, `CanalId`, `ProductoId`, `ServicioId`, `ProyectoId`, and `EquipoId` |
|
|
32
|
+
| `Presupuesto` | Budget fact | Uses `Fecha`, `ClienteId`, `CanalId`, `ProductoId`, `ServicioId`, `ProyectoId`, and `EquipoId` |
|
|
33
|
+
| `Devoluciones` | Product return fact | Uses `Fecha`, `ClienteId`, `CanalId`, and `ProductoId` |
|
|
34
|
+
| `Horas` | People capacity fact | Uses `Fecha`, `EquipoId`, `ProyectoId`, and `ServicioId` |
|
|
35
|
+
| `Nómina` | People cost fact | Uses `Fecha`, `EquipoId`, `ProyectoId`, and `ServicioId` |
|
|
36
|
+
| `Ejecución proyectos` | Project execution fact | Uses `Fecha`, `ProyectoId`, `ClienteId`, `ServicioId`, and `EquipoId` |
|
|
37
|
+
| `Tareas proyecto` | Project task fact | Uses `Fecha`, `ProyectoId`, and `EquipoId` |
|
|
38
|
+
|
|
39
|
+
## Demo ID Contract
|
|
40
|
+
|
|
41
|
+
The template avoids Demo/Real collisions by making demo IDs text values with an entity-coded prefix:
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
ClienteA01R
|
|
45
|
+
ProductoA01S
|
|
46
|
+
CanalA01P
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The original ID columns remain the relationship columns. Packaged demo queries generate stable codes from the entity name plus a deterministic alphanumeric suffix:
|
|
50
|
+
|
|
51
|
+
```powerquery
|
|
52
|
+
ClienteId = EntityCode("Cliente", [ClienteId])
|
|
53
|
+
ProductoId = EntityCode("Producto", [ProductoId])
|
|
54
|
+
CanalId = EntityCode("Canal", [CanalId])
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The suffix is intentionally readable in demos: `EntityCode("Cliente", 25)` returns `ClienteA25D`. This keeps relationship keys stable without exposing generic `Demo#########` values in teaching views or drill-through tables.
|
|
58
|
+
|
|
59
|
+
Do not add extra key columns for this split. Real staging queries keep the user's source IDs in the same columns, converted to text, and add only `Data = "Real"`.
|
|
60
|
+
|
|
61
|
+
## Generated Domain Models
|
|
62
|
+
|
|
63
|
+
When `/bi-kickoff` has replaced the packaged Andina Nexus sample with another domain (finance, habits, inventory, logistics, HR, etc.), `/bi-powerquery` must discover appendable business tables from the project itself:
|
|
64
|
+
|
|
65
|
+
- Read `AGENTS.md` and `docs/mapeo-de-datos.md` when present.
|
|
66
|
+
- Inspect loaded business tables that expose a visible `Data` column with demo rows.
|
|
67
|
+
- Inspect relationships from fact tables to `Calendario` and business dimensions.
|
|
68
|
+
- Use the existing table columns as the destination contract.
|
|
69
|
+
- Keep the table name stable and append real rows into that same table through a `*_Real` staging query.
|
|
70
|
+
|
|
71
|
+
The bundled staging generator supports this mode by passing the discovered schema:
|
|
72
|
+
|
|
73
|
+
```powershell
|
|
74
|
+
.\scripts\new-powerquery-staging.ps1 `
|
|
75
|
+
-TableName "Inventario semanal" `
|
|
76
|
+
-SourceExpression 'Excel.CurrentWorkbook(){[Name="Inventario"]}[Content]' `
|
|
77
|
+
-RequiredColumns InventarioId,Fecha,StockDisponible `
|
|
78
|
+
-ColumnTypesJson '{"InventarioId":"type text","Fecha":"type date","StockDisponible":"type number"}'
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Do not force generated projects back into `Ventas`, `Clientes`, `Productos`, or `Canales`.
|
|
82
|
+
|
|
83
|
+
## Source Columns
|
|
84
|
+
|
|
85
|
+
Column names in this section are Power Query source-column names. Some display names in the model are friendlier, for example `Pais` can display as `País`, but the staging contract uses the source column.
|
|
86
|
+
|
|
87
|
+
`Clientes` real source columns:
|
|
88
|
+
- `ClienteId`
|
|
89
|
+
- `Cliente`
|
|
90
|
+
- `Segmento`
|
|
91
|
+
- `Pais`
|
|
92
|
+
|
|
93
|
+
`Productos` real source columns:
|
|
94
|
+
- `ProductoId`
|
|
95
|
+
- `Producto`
|
|
96
|
+
- `Categoria`
|
|
97
|
+
- `Subcategoria`
|
|
98
|
+
|
|
99
|
+
`Canales` real source columns:
|
|
100
|
+
- `CanalId`
|
|
101
|
+
- `Canal`
|
|
102
|
+
- `Tipo de canal`
|
|
103
|
+
|
|
104
|
+
`Servicios` real source columns:
|
|
105
|
+
- `ServicioId`
|
|
106
|
+
- `Servicio`
|
|
107
|
+
- `Línea servicio`
|
|
108
|
+
- `Modalidad`
|
|
109
|
+
|
|
110
|
+
`Proyectos` real source columns:
|
|
111
|
+
- `ProyectoId`
|
|
112
|
+
- `Proyecto`
|
|
113
|
+
- `Tipo proyecto`
|
|
114
|
+
- `Estado proyecto`
|
|
115
|
+
|
|
116
|
+
`Equipos` real source columns:
|
|
117
|
+
- `EquipoId`
|
|
118
|
+
- `Equipo`
|
|
119
|
+
- `Área equipo`
|
|
120
|
+
- `Seniority`
|
|
121
|
+
|
|
122
|
+
`Campañas` real source columns:
|
|
123
|
+
- `CampañaId`
|
|
124
|
+
- `Campaña`
|
|
125
|
+
- `Canal marketing`
|
|
126
|
+
- `Objetivo campaña`
|
|
127
|
+
|
|
128
|
+
`Ventas` real source columns:
|
|
129
|
+
- `VentaId`
|
|
130
|
+
- `Fecha`
|
|
131
|
+
- `ProductoId`
|
|
132
|
+
- `ClienteId`
|
|
133
|
+
- `CanalId`
|
|
134
|
+
- `Moneda`
|
|
135
|
+
- `Cantidad`
|
|
136
|
+
- `Precio Unitario`
|
|
137
|
+
- `Costo Unitario`
|
|
138
|
+
- `Venta Bruta`
|
|
139
|
+
- `Costo Total`
|
|
140
|
+
- `Venta Bruta Base`
|
|
141
|
+
- `Costo Total Base`
|
|
142
|
+
|
|
143
|
+
`Oportunidades` real source columns:
|
|
144
|
+
- `OportunidadId`
|
|
145
|
+
- `Fecha`
|
|
146
|
+
- `ClienteId`
|
|
147
|
+
- `CanalId`
|
|
148
|
+
- `ProductoId`
|
|
149
|
+
- `ServicioId`
|
|
150
|
+
- `Estado`
|
|
151
|
+
- `Importe Potencial Base`
|
|
152
|
+
- `Probabilidad`
|
|
153
|
+
|
|
154
|
+
`Leads` real source columns:
|
|
155
|
+
- `LeadBatchId`
|
|
156
|
+
- `Fecha`
|
|
157
|
+
- `CampañaId`
|
|
158
|
+
- `CanalId`
|
|
159
|
+
- `ClienteId`
|
|
160
|
+
- `Leads`
|
|
161
|
+
- `MQLs`
|
|
162
|
+
- `Clientes ganados`
|
|
163
|
+
- `Costo Base`
|
|
164
|
+
- `Ventas Atribuidas Base`
|
|
165
|
+
|
|
166
|
+
`Interacciones clientes` real source columns:
|
|
167
|
+
- `InteraccionId`
|
|
168
|
+
- `Fecha`
|
|
169
|
+
- `ClienteId`
|
|
170
|
+
- `CanalId`
|
|
171
|
+
- `ProductoId`
|
|
172
|
+
- `ServicioId`
|
|
173
|
+
- `Clientes Inicio`
|
|
174
|
+
- `Clientes Perdidos`
|
|
175
|
+
- `NPS`
|
|
176
|
+
- `Reclamos`
|
|
177
|
+
- `Tiempo Respuesta Horas`
|
|
178
|
+
|
|
179
|
+
`Entregas` real source columns:
|
|
180
|
+
- `EntregaId`
|
|
181
|
+
- `Fecha`
|
|
182
|
+
- `ClienteId`
|
|
183
|
+
- `CanalId`
|
|
184
|
+
- `ProductoId`
|
|
185
|
+
- `ServicioId`
|
|
186
|
+
- `Entregas`
|
|
187
|
+
- `Entregas A Tiempo`
|
|
188
|
+
|
|
189
|
+
`Órdenes servicio` real source columns:
|
|
190
|
+
- `OrdenServicioId`
|
|
191
|
+
- `Fecha`
|
|
192
|
+
- `ClienteId`
|
|
193
|
+
- `ProductoId`
|
|
194
|
+
- `ServicioId`
|
|
195
|
+
- `EquipoId`
|
|
196
|
+
- `Órdenes`
|
|
197
|
+
- `Órdenes Completadas`
|
|
198
|
+
- `Backlog`
|
|
199
|
+
- `Tiempo Ciclo Días`
|
|
200
|
+
- `SLA Cumplido`
|
|
201
|
+
- `Retrabajos`
|
|
202
|
+
- `Horas Usadas`
|
|
203
|
+
- `Horas Disponibles`
|
|
204
|
+
- `Servicios Adjuntos`
|
|
205
|
+
|
|
206
|
+
`Movimientos financieros` real source columns:
|
|
207
|
+
- `MovimientoId`
|
|
208
|
+
- `Fecha`
|
|
209
|
+
- `ClienteId`
|
|
210
|
+
- `CanalId`
|
|
211
|
+
- `ProductoId`
|
|
212
|
+
- `ServicioId`
|
|
213
|
+
- `ProyectoId`
|
|
214
|
+
- `EquipoId`
|
|
215
|
+
- `Tipo movimiento`
|
|
216
|
+
- `Importe Base`
|
|
217
|
+
|
|
218
|
+
`Presupuesto` real source columns:
|
|
219
|
+
- `PresupuestoId`
|
|
220
|
+
- `Fecha`
|
|
221
|
+
- `ClienteId`
|
|
222
|
+
- `CanalId`
|
|
223
|
+
- `ProductoId`
|
|
224
|
+
- `ServicioId`
|
|
225
|
+
- `ProyectoId`
|
|
226
|
+
- `EquipoId`
|
|
227
|
+
- `Área presupuesto`
|
|
228
|
+
- `Importe Presupuesto Base`
|
|
229
|
+
|
|
230
|
+
`Devoluciones` real source columns:
|
|
231
|
+
- `DevolucionId`
|
|
232
|
+
- `Fecha`
|
|
233
|
+
- `ClienteId`
|
|
234
|
+
- `CanalId`
|
|
235
|
+
- `ProductoId`
|
|
236
|
+
- `Unidades Devueltas`
|
|
237
|
+
|
|
238
|
+
`Horas` real source columns:
|
|
239
|
+
- `HoraId`
|
|
240
|
+
- `Fecha`
|
|
241
|
+
- `EquipoId`
|
|
242
|
+
- `ProyectoId`
|
|
243
|
+
- `ServicioId`
|
|
244
|
+
- `Horas Planificadas`
|
|
245
|
+
- `Horas Trabajadas`
|
|
246
|
+
- `Horas Facturables`
|
|
247
|
+
- `Horas Disponibles`
|
|
248
|
+
- `Horas Ausentes`
|
|
249
|
+
|
|
250
|
+
`Nómina` real source columns:
|
|
251
|
+
- `NominaId`
|
|
252
|
+
- `Fecha`
|
|
253
|
+
- `EquipoId`
|
|
254
|
+
- `ProyectoId`
|
|
255
|
+
- `ServicioId`
|
|
256
|
+
- `Headcount`
|
|
257
|
+
- `Costo Laboral Base`
|
|
258
|
+
- `Bajas`
|
|
259
|
+
|
|
260
|
+
`Ejecución proyectos` real source columns:
|
|
261
|
+
- `EjecucionProyectoId`
|
|
262
|
+
- `Fecha`
|
|
263
|
+
- `ProyectoId`
|
|
264
|
+
- `ClienteId`
|
|
265
|
+
- `ServicioId`
|
|
266
|
+
- `EquipoId`
|
|
267
|
+
- `Estado ejecución`
|
|
268
|
+
- `Avance`
|
|
269
|
+
- `Ingresos Base`
|
|
270
|
+
- `Costos Base`
|
|
271
|
+
- `Presupuesto Base`
|
|
272
|
+
|
|
273
|
+
`Tareas proyecto` real source columns:
|
|
274
|
+
- `TareaProyectoId`
|
|
275
|
+
- `Fecha`
|
|
276
|
+
- `ProyectoId`
|
|
277
|
+
- `EquipoId`
|
|
278
|
+
- `Tareas`
|
|
279
|
+
- `Tareas Vencidas`
|
|
280
|
+
- `Horas`
|
|
281
|
+
|
|
282
|
+
## Generated Columns
|
|
283
|
+
|
|
284
|
+
Every real staging query must add only:
|
|
285
|
+
|
|
286
|
+
```powerquery
|
|
287
|
+
Data = "Real"
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
ID columns are converted to text so they can append cleanly to the demo tables.
|
|
291
|
+
|
|
292
|
+
## Relationships
|
|
293
|
+
|
|
294
|
+
Power BI relationships stay on the original ID columns:
|
|
295
|
+
|
|
296
|
+
- `Ventas[ProductoId]` -> `Productos[ProductoId]`
|
|
297
|
+
- `Ventas[ClienteId]` -> `Clientes[ClienteId]`
|
|
298
|
+
- `Ventas[CanalId]` -> `Canales[CanalId]`
|
|
299
|
+
- `Ventas[Fecha]` -> `Calendario[Fecha]`
|
|
300
|
+
- `Leads[CampañaId]` -> `Campañas[CampañaId]`
|
|
301
|
+
- `Oportunidades[ServicioId]` -> `Servicios[ServicioId]`
|
|
302
|
+
- `Interacciones clientes[ServicioId]` -> `Servicios[ServicioId]`
|
|
303
|
+
- `Movimientos financieros[ProyectoId]` -> `Proyectos[ProyectoId]`
|
|
304
|
+
- `Presupuesto[EquipoId]` -> `Equipos[EquipoId]`
|
|
305
|
+
- `Horas[ProyectoId]` -> `Proyectos[ProyectoId]`
|
|
306
|
+
- `Ejecución proyectos[ProyectoId]` -> `Proyectos[ProyectoId]`
|
|
307
|
+
- `Tareas proyecto[EquipoId]` -> `Equipos[EquipoId]`
|
|
308
|
+
|
|
309
|
+
## Non-Appendable Tables
|
|
310
|
+
|
|
311
|
+
Do not append real business rows into these framework tables as part of `/bi-powerquery`:
|
|
312
|
+
|
|
313
|
+
- `Calendario`
|
|
314
|
+
- `Métricas`
|
|
315
|
+
- `Equipos métricas`
|
|
316
|
+
- `_Aux *`
|
|
317
|
+
- `_GC *`
|
|
318
|
+
- `_PC *`
|
|
319
|
+
- `_Aux Modelo configuración`
|
|
320
|
+
- `Monedas`
|
|
321
|
+
- `Tipo de cambio`
|
|
322
|
+
|
|
323
|
+
These tables are semantic/report infrastructure. Extend them only through a dedicated modeling task.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Power Query Standards
|
|
2
|
+
|
|
3
|
+
## Contract First
|
|
4
|
+
|
|
5
|
+
- Validate required source columns before selecting, transforming, or appending.
|
|
6
|
+
- Keep final column order deterministic and identical to the base-template contract.
|
|
7
|
+
- Fail loudly when required columns are missing. Do not create placeholder business fields silently.
|
|
8
|
+
- Do not use `MissingField.UseNull` or `MissingField.Ignore` in generated staging queries. Microsoft Learn documents those options as missing-column fallbacks; this workflow wants missing columns to fail because a silent null column would corrupt relationships and measures.
|
|
9
|
+
- Add or overwrite `Data = "Real"` inside the real staging query, not after append. If the source already has a `Data` column, replace its values with `Real` instead of keeping user-supplied source labels.
|
|
10
|
+
|
|
11
|
+
## Types
|
|
12
|
+
|
|
13
|
+
- Use `Table.TransformColumnTypes` with an explicit culture such as `"en-US"` when parsing IDs, dates, and numbers.
|
|
14
|
+
- Use `type text` for relationship IDs so real rows can append to the demo tables, whose IDs are entity-coded text values such as `ClienteA25D`.
|
|
15
|
+
- Use `Int64.Type` for counts.
|
|
16
|
+
- Use `type number` for monetary/decimal values.
|
|
17
|
+
- For dates, match the `Calendario` key type **exactly** and strip any time component (e.g. `Date.From([Fecha])` or `type date`). A `datetime` carrying a non-midnight time silently fails to match `Calendario[Fecha]` — the engine compares the full datetime, so those rows won't join and time-intelligence goes blank/wrong.
|
|
18
|
+
|
|
19
|
+
## Query Shape
|
|
20
|
+
|
|
21
|
+
Recommended real staging shape:
|
|
22
|
+
|
|
23
|
+
```powerquery
|
|
24
|
+
let
|
|
25
|
+
Source = ...,
|
|
26
|
+
RequiredColumns = {...},
|
|
27
|
+
MissingColumns = List.Difference(RequiredColumns, Table.ColumnNames(Source)),
|
|
28
|
+
AssertRequiredColumns = if List.Count(MissingColumns) = 0 then Source else error Error.Record("MissingColumns", "Source is missing required columns.", MissingColumns),
|
|
29
|
+
Typed = Table.TransformColumnTypes(AssertRequiredColumns, {...}, "en-US"),
|
|
30
|
+
AddData = if Table.HasColumns(Typed, "Data") then Table.TransformColumns(Typed, {{"Data", each "Real", type text}}) else Table.AddColumn(Typed, "Data", each "Real", type text),
|
|
31
|
+
Result = Table.SelectColumns(AddData, {...})
|
|
32
|
+
in
|
|
33
|
+
Result
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## MCP Authoring Contract
|
|
37
|
+
|
|
38
|
+
PBIP/TMDL files are read-only snapshots. Use them to inspect the current model,
|
|
39
|
+
compare output, and validate the saved result; do not edit them directly when a
|
|
40
|
+
live Power BI Desktop model is open.
|
|
41
|
+
|
|
42
|
+
Live Power Query changes must go through Power BI Modeling MCP:
|
|
43
|
+
|
|
44
|
+
- Use `query_group_operations` to create or reuse a helper query group.
|
|
45
|
+
- Use `named_expression_operations` to create or update unloaded `*_Real` M
|
|
46
|
+
staging queries.
|
|
47
|
+
- Use `partition_operations` to update the loaded table partition that appends
|
|
48
|
+
Demo + Real.
|
|
49
|
+
- Refresh data from **Power BI Desktop** (`Inicio ▶ Actualizar`, or `Aplicar
|
|
50
|
+
cambios` when Power Query has pending changes). Microsoft does not support
|
|
51
|
+
processing/refresh commands against a model open in Desktop, so do not try to
|
|
52
|
+
refresh data through the MCP — author metadata via MCP, then let Desktop load
|
|
53
|
+
the data.
|
|
54
|
+
- Save Power BI Desktop before claiming persistence.
|
|
55
|
+
- Use `database_operations` / `ExportToTmdlFolder` only after save/export to
|
|
56
|
+
inspect and validate the snapshot Desktop wrote.
|
|
57
|
+
|
|
58
|
+
If the MCP surface cannot author the required object, guide the user through
|
|
59
|
+
Power BI Desktop for that step. Do not patch `.tmdl`, `.SemanticModel/**`, or
|
|
60
|
+
partition files as a workaround.
|
|
61
|
+
|
|
62
|
+
## Refresh Hygiene
|
|
63
|
+
|
|
64
|
+
- Keep `*_Real` staging queries unloaded after they feed the loaded template table.
|
|
65
|
+
- Keep credentials and privacy levels explicit. Do not mix local files, web APIs, and organizational sources casually in the same query.
|
|
66
|
+
- Preserve query folding for SQL and Fabric sources by pushing filters and type operations as close to the source as possible.
|
|
67
|
+
- Avoid hard-coded local user paths in reusable skill output; parameterize paths or ask the user for a project-local location.
|
|
68
|
+
- Write generated `.m` snippets only to scratch folders such as `.\powerquery-output`; never place them inside `pbip-files/`, `*.SemanticModel`, `*.Report`, `.pbi`, `DAXQueries`, or `TMDLScripts`. Those locations are Power BI project artifacts, not agent scratch space.
|
|
69
|
+
|
|
70
|
+
## Agent Behavior
|
|
71
|
+
|
|
72
|
+
- Explain the Demo/Real split while editing so the user understands why `Data` exists.
|
|
73
|
+
- Summarize generated M and validation results; only paste full M when the user asks.
|
|
74
|
+
- Use Power BI Modeling MCP for live semantic-model writes and Desktop save/export for persistence.
|