本文へ移動
cccskills
無料GitHub で公開

fabric-capacity

Automatically invoke this skill whenever the user asks why a Fabric capacity is busy, throttled, at 90 or 100 percent, or what is consuming CUs; asks for current capacity utilization, carry forward or per-item CU usage; wants to query or repair the Microsoft Fabric Capacity Metrics app or its semantic model; or wants to start, pause or monitor a capacity from a script or status bar.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md5.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Fabric Capacity

Read capacity utilization and per-item CU from the Microsoft Fabric Capacity Metrics semantic model with fab, and start or pause a capacity. Invoke the fabric-cli skill alongside this one; its references/capacity-cost.md covers budget math, smoothing and throttling.

Where the numbers live

live (DirectQuery, CapacityMetricsCES connector):
  CU Detail:                 per 30 s timepoint; Interactive, Background, CU limit, SKU
  Timepoint CU Detail:       same, per timepoint detail page
  Metrics By Item [And Day|And Hour|And Operation]: CU (s), Duration (s), Operations, Users per item
  System Events:             pause, resume, state changes
import (fresh only after a model refresh; Pro workspace = 8 refreshes a day):
  Capacities, Items, Workspaces, Timepoints/Dates calendars
  Average utilization (last 1 hour | last 24 hours | last 7 days): measures on the Health page
not available:               Azure Monitor has no metrics namespace for Microsoft.Fabric/capacities

Anything that must be current (a status bar, "what is using the capacity now") needs the DirectQuery tables.

Query with fab

The model sits in a Pro workspace, so there is no XMLA endpoint and te cannot connect. Use executeQueries through fab. DirectQuery tables need the capacity passed as an M parameter inside a DEFINE block; without it the connector fails, and the error reads like a credential problem.

fab api -A powerbi "groups/<metrics-ws-id>/datasets/<metrics-model-id>/executeQueries" -X post -i "$(jq -cn --arg q "$(cat <<'EOF'
DEFINE
  MPARAMETER 'CapacitiesList' = {"<CAPACITY-ID-UPPERCASE>"}
  VAR point = MINX(TOPN(2, 'CU Detail', 'CU Detail'[Window start time], DESC), 'CU Detail'[Window start time])
EVALUATE
ROW("pct", CALCULATE(
  DIVIDE(SUM('CU Detail'[Interactive]) + SUM('CU Detail'[Background]), MAX('CU Detail'[Base capacity units]) * 30),
  'CU Detail'[Window start time] = point) * 100)
EOF
)" '{queries: [{query: $q}]}')"
  • CU Detail values are CU-seconds per 30 s timepoint, already smoothed; utilization % = (Interactive + Background) / (Base capacity units * 30). CU limit is a ratio (1.0), not a denominator
  • The newest timepoint can hold a whole background operation charged at its start (thousands of percent); read the one before it
  • Capacity IDs: fab api -A powerbi capacities
  • Per item for a day: SUMMARIZECOLUMNS(Items[Workspace name], Items[Item kind], Items[Item name], TREATAS({DATE(y,m,d)}, 'Metrics By Item And Day'[Date]), "CUs", SUM('Metrics By Item And Day'[CU (s)]))
  • Schema: INFO.VIEW.TABLES(), INFO.VIEW.COLUMNS(), INFO.VIEW.MEASURES() work over executeQueries; INFO.TABLES() and measure expressions do not
  • fab paths break on names containing /; use IDs with fab api

Start and pause

fab get ".capacities/<name>.Capacity" -q properties.state   # Active | Paused, ~10 s
fab start ".capacities/<name>.Capacity" -f
fab stop  ".capacities/<name>.Capacity" -f                  # bills the carry forward at once

fab get output ends in \r; strip it before comparing.

Keeping the metrics app alive

Failure modes seen on one tenant, in the order they surfaced:

  • The data source OAuth refresh token expires after 90 days without use (AADSTS700082); scheduled refresh stops and the model goes stale silently. Re-enter the credential in the model settings, then refresh
  • An old app version (47 from 2024) could not serve DirectQuery at all. Update from Apps, Get apps, Template apps, Microsoft Fabric Capacity Metrics, "Update the workspace and the app". It updates in place (same workspace and model IDs) but appends a date to the workspace name; rename it back or fab and te paths break on the /
  • After the credential had been re-entered several times, DirectQuery stayed broken (The credentials provided for the CapacityMetricsCES source are invalid, QueryUserError) even with a passing connection test and working refreshes. Only deleting the app workspace and installing the app fresh fixed it: Get it now, Connect, UTC_offset in standard time, OAuth2, pick the capacity admin in the account window. A fresh install gets new workspace and model IDs
  • Saving the credential dialog with "Skip test connection" ticked stores a credential that refreshes fine but fails every DirectQuery with The credentials provided for the CapacityMetricsCES source are invalid (QueryUserError). Save again with the box unticked; open the settings page with ?alwaysPromptForContentProviderCreds=true to force a fresh OAuth prompt and pick the capacity admin account explicitly when the browser holds several
  • Moving the workspace to Premium Per User to get XMLA did not help and broke nothing that was not already broken; keep it on shared capacity as Microsoft recommends
  • The account on the credential must be a capacity admin of every capacity queried

What usually fills a small capacity

  • Preview Planning sessions: one Stakeholder session is 168 CU-h, billed at once (604,800 CU-s on an F2), drives the capacity into carry forward for days; see fabric-cli capacity-cost.md
  • SQL databases: one new rayfin app backend database took 3,584 CU-s in a single hour on an F2 (half the capacity) and held interactive utilization at 93 % for over an hour while its app was being tested. This includes the __fabric_plan_sys and <name>_plan databases Planning creates, and app backends' databases) consume CU continuously while awake
  • Background jobs are smoothed over 24 h, so a busy morning still counts at night

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Automatically invoke this skill whenever the user asks about Fabric tenant settings or Power BI tenant settings or auditing tenant settings. You can use this skill if the user mentions "Fabric administration".

日本語の概要は準備中です。原文の説明を表示しています。

data-goblin/power-bi-agentic-development1,0372026年10月11日 更新

bpa-rules

無料

Interactive BPA rule generation for Power BI semantic models; guided discovery, model investigation, and expert rule authoring. Automatically invoke when the user mentions "BPA rule", "Best Practice Analyzer", or asks to "create a BPA rule", "audit BPA rules", "recommend BPA rules", "set up BPA for my team", "check model for best practices", "validate BPA rules", "improve a BPA expression".

日本語の概要は準備中です。原文の説明を表示しています。

data-goblin/power-bi-agentic-development1,0372026年10月11日 更新

Writing and executing C# scripts and macros against Power BI semantic models using Tabular Editor 2/3. Automatically invoke when the user mentions "C# script", "Tabular Editor script", "TOM scripting", "MacroActions.json", "XMLA", or asks to "automate model changes", "bulk update measures", "create calculation groups", "write a macro", "format DAX expressions", "manage model metadata".

日本語の概要は準備中です。原文の説明を表示しています。

data-goblin/power-bi-agentic-development1,0372026年10月11日 更新

TOM and ADOMD.NET guidance via PowerShell for connecting to Power BI Desktop's local Analysis Services instance. Covers model enumeration, DAX queries, metadata modification, annotations, calendar definitions, field parameters, query tracing, DAX library package management (daxlib.org), and the Desktop Bridge for reloading and screenshotting the report canvas. Automatically invoke when the user mentions "Power BI Desktop", "Analysis Services port", "TOM", "ADOMD", "daxlib", "DAX library", "DAX UDF package", or asks to "connect to PBI Desktop", "query PBI Desktop with DAX", "modify PBI Desktop model", "add a measure to PBI", "capture visual queries", "create a field parameter", "validate DAX", "intercept DAX queries", "install daxlib", "add DAX SVG", "add IBCS", "reload the report canvas", "screenshot a report page", "Desktop Bridge", or to work with the model and report in Power BI Desktop together.

日本語の概要は準備中です。原文の説明を表示しています。

data-goblin/power-bi-agentic-development1,0372026年10月11日 更新

Step-by-step workflow for creating complete Power BI reports from scratch using pbir CLI. Covers model discovery, report creation, page layout, theme setup, visual placement, field binding, filtering, formatting, validation, and publishing. Automatically invoke when the user asks to "create a new report", "build a report from scratch", "make a dashboard", "set up a report with KPIs", "create an executive dashboard", "add pages and visuals to a new report".

日本語の概要は準備中です。原文の説明を表示しています。

data-goblin/power-bi-agentic-development1,0372026年10月11日 更新

dax

無料

DAX performance optimization for semantic models. Automatically invoke when the user asks to "optimize DAX", "fix slow DAX", "DAX performance", "tune a measure", "debug a measure", "DAX anti-patterns", or mentions slow queries, server timings, or DAX authoring.

日本語の概要は準備中です。原文の説明を表示しています。

data-goblin/power-bi-agentic-development1,0372026年10月11日 更新

data-goblin のスキルをすべて見る

このスキルの問題を報告する