/powerbi-master:fabric-integrationfrom powerbi-master
Configures Microsoft Fabric integration with Power BI semantic models: Direct Lake mode, medallion architecture, Fabric capacity sizing, and sempy workflows for lakehouse-to-semantic-model patterns.
Ships in powerbi-master. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Microsoft Fabric is the unified analytics platform that includes Power BI, Data Factory, Data Engineering, Data Science, Real-Time Intelligence, and Data Warehouse. Power BI is deeply integrated as the visualization and semantic modeling layer of Fabric.
Direct Lake is a storage mode exclusive to Fabric that reads data directly from delta tables in OneLake without importing or sending DirectQuery requests.
| Feature | Import | DirectQuery | Direct Lake |
|---|---|---|---|
| Data freshness | Snapshot at refresh | Real-time | Near real-time (after framing) |
| Query performance | Fastest (all in memory) | Depends on source | Near-import (on-demand load) |
| Refresh time | Minutes to hours | N/A | Seconds (framing only) |
| Refresh cost | High (full data copy) | None | Very low (metadata only) |
| Data size limit | 10GB (Premium), 1GB (PBIX) | Source limit | Fabric capacity limit |
| DAX support | Full | Limited | Full |
| Calculated columns | Yes | No | Yes |
| Source requirement | Any | Any | OneLake delta tables only |
| Capacity requirement | Any | Any | Fabric F-SKU |
| Variant | Source | Multi-Source | Fallback | Use Case | GA Status |
|---|---|---|---|---|---|
| Direct Lake on OneLake (DL/OL) | OneLake delta files | Yes (multiple Fabric items) | NO fallback | Flexible, multiple lakehouses | GA |
| Direct Lake on SQL (DL/SQL) | Fabric SQL endpoint | No (single Fabric item) | Falls back to DirectQuery | SQL-centric, single source | GA |
In Power BI Desktop (2025+ preview):
Via Fabric Service:
Programmatically via TOM:
var database = new Database() { Name = "DirectLakeModel" };
var model = new Model() { Name = "DirectLakeModel" };
database.Model = model;
// Direct Lake partition source
var table = new Table() { Name = "Sales" };
table.Partitions.Add(new Partition() {
Name = "Sales-DL",
Mode = ModeType.DirectLake,
Source = new EntityPartitionSource() {
EntityName = "Sales",
SchemaName = "dbo",
ExpressionSource = new ExpressionSource() {
Expression = "DatabaseQuery"
}
}
});
model.Tables.Add(table);
Critical distinction: DL/OL does NOT fall back to DirectQuery. If data cannot be served from memory, the query fails. This means DL/OL models must be carefully sized within capacity guardrails.
| Guardrail | F2 | F4 | F8 | F16 | F32 | F64 | F128 |
|---|---|---|---|---|---|---|---|
| Max model size on disk | 2 GB | 4 GB | 8 GB | 16 GB | 32 GB | 64 GB | 128 GB |
| Max rows per table | 300M | 300M | 300M | 1.5B | 3B | 6B | 6B |
| Max files/row groups per table | 1K | 1K | 1K | 1K | 1K | 5K | 5K |
| Concurrent DL queries | 4 | 8 | 16 | 32 | 64 | 128 | 256 |
Max Memory is a soft limit for paging -- exceeding it causes performance degradation but not failure.
Max model size on disk/OneLake is a hard guardrail -- exceeding causes DQ fallback (DL/SQL) or query failure (DL/OL).
| Fallback Behavior | Setting | Impact |
|---|---|---|
| Automatic fallback to DirectQuery | Default (DL/SQL only) | Query still works but slower |
| Block fallback | DirectLakeBehavior = DirectLakeOnly | Query fails if cannot serve from DL |
| No fallback option | Default (DL/OL) | Queries always fail if data unavailable |
Monitor fallback in Fabric Capacity Metrics app -- frequent fallback indicates model design issues.
Common fallback triggers (DL/SQL):
Direct Lake mode is now fully supported for embedded analytics, backed by Microsoft SLA. Generate embed tokens for Direct Lake semantic models using the same embed token API as Import/DirectQuery models.
# Trigger framing via REST API
POST https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/datasets/{datasetId}/refreshes
{
"type": "Automatic"
}
Framing is extremely fast (seconds) compared to Import refresh (minutes/hours). Schedule frequent framing for near-real-time data.
OneLake is Fabric's unified data lake -- a single store for all analytics data, built on Azure Data Lake Storage Gen2 with delta format.
Connect to external data without copying:
| Shortcut Type | Source | Use Case |
|---|---|---|
| OneLake | Another Fabric item | Cross-workspace data sharing |
| ADLS Gen2 | Azure Data Lake | Existing Azure data |
| S3 | Amazon S3 | Multi-cloud data |
| GCS | Google Cloud Storage | Multi-cloud data |
| Dataverse | Dynamics 365 | Business app data |
Access OneLake data programmatically:
# Using Azure Storage SDK (OneLake supports ADLS Gen2 API)
from azure.storage.filedatalake import DataLakeServiceClient
service_client = DataLakeServiceClient(
account_url="https://onelake.dfs.fabric.microsoft.com",
credential=token_credential
)
file_system_client = service_client.get_file_system_client(workspace_id)
directory_client = file_system_client.get_directory_client(f"{lakehouse_name}.Lakehouse/Tables")
A lakehouse combines data lake flexibility with warehouse SQL capabilities:
Power BI connectivity:
[Data Sources] --> [Fabric Notebooks/Pipelines] --> [Lakehouse Delta Tables]
| |
v v
[Power Query Dataflows Gen2] [Direct Lake Semantic Model]
|
v
[Power BI Reports]
Fully managed SQL warehouse in Fabric:
Cloud-based ETL in Fabric, evolution of Power BI Dataflows:
| Feature | Dataflow Gen1 | Dataflow Gen2 |
|---|---|---|
| Destinations | Power BI dataset only | Lakehouse, Warehouse, KQL DB, Azure SQL, ADLS Gen2, SharePoint |
| Compute | Power Query Online | Power Query Online + Fabric Spark |
| Staging | Optional (Premium) | Always enabled |
| Incremental refresh | Limited | Full support (GA to Lakehouse 2025) |
| Monitoring | Basic | Fabric monitoring hub |
| CI/CD | Not supported | Git integration + deployment pipelines (2025) |
| Variable library | Not supported | Parameterized source paths and expressions (2025) |
| Publish performance | Single-threaded validation | Parallelized query validations (2026) |
Gen1 deprecation: Microsoft has announced Gen1 is legacy. Migrate to Gen2 for all new development. Gen2 supports all Gen1 connectors plus Fabric-native destinations.
| Destination | Protocol |
|---|---|
| Fabric Lakehouse delta tables | Delta/Parquet |
| Fabric Warehouse tables | T-SQL |
| Fabric KQL Database tables | KQL |
| Fabric SQL Database tables | T-SQL |
| Azure SQL Database tables | T-SQL |
| Azure Data Explorer (Kusto) tables | KQL |
| ADLS Gen2 files | File (CSV, Parquet) |
| SharePoint files | File |
Fabric Real-Time Intelligence items now have GA lifecycle management (2025):
| Item | ALM Support | Integration |
|---|---|---|
| Eventstream | Git + deployment pipelines | Ingests from Event Hubs, Kafka, IoT Hub, custom APIs |
| Eventhouse | Git + deployment pipelines | Houses KQL databases |
| KQL Database | Git + deployment pipelines | DirectQuery from Power BI |
| Real-time Dashboard | Git + deployment pipelines | Native Fabric dashboard for streaming |
| Data Activator | Git + deployment pipelines | Alert/trigger on data conditions |
[Event Hubs/Kafka/IoT Hub] --> [Eventstream] --> [KQL Database] --> [Power BI DirectQuery]
|
+--> [Lakehouse] --> [Power BI Direct Lake]
Fabric notebooks (PySpark/Spark SQL) write data that Power BI consumes:
# Write DataFrame to lakehouse delta table
df.write.format("delta").mode("overwrite").saveAsTable("Sales")
# Optimized write with partitioning
df.write.format("delta") \
.partitionBy("Year", "Month") \
.mode("overwrite") \
.option("overwriteSchema", "true") \
.saveAsTable("Sales")
# V-Order optimization (improves Direct Lake read performance)
spark.conf.set("spark.sql.parquet.vorder.enabled", "true")
df.write.format("delta").mode("overwrite").saveAsTable("Sales")
V-Order: A write-time optimization that orders Parquet data for faster Direct Lake reads. Enable in notebook or pipeline configuration.
| Fabric Item | Power BI Integration |
|---|---|
| Lakehouse | Direct Lake, SQL endpoint for DQ |
| Warehouse | Direct Lake, T-SQL queries |
| KQL Database | DirectQuery via KQL connector |
| Notebooks | Data prep, model management via sempy |
| Data Pipelines | Orchestrate refresh, data movement |
| Dataflow Gen2 | ETL to lakehouse for DL consumption |
| Eventstream | Real-time data to KQL, then to PBI |
| ML Models | Score in notebooks, results to lakehouse |
Python library for Power BI semantic model interaction in Fabric notebooks:
import sempy.fabric as fabric
# List datasets in workspace
datasets = fabric.list_datasets()
# Read data from semantic model using DAX
df = fabric.evaluate_dax(
dataset="SalesModel",
dax_string="EVALUATE SUMMARIZECOLUMNS('Date'[Year], 'Product'[Category], \"Sales\", [Total Sales])"
)
# Read model metadata
tables = fabric.list_tables(dataset="SalesModel")
measures = fabric.list_measures(dataset="SalesModel")
# Refresh dataset
fabric.refresh_dataset(dataset="SalesModel")
Mix Direct Lake tables with Import tables in a single semantic model:
| Source Table | Storage Mode | When to Use |
|---|---|---|
| Lakehouse fact table | Direct Lake | Large transaction data |
| Lakehouse dimension | Direct Lake | Shared dimension from gold layer |
| External reference data | Import | Small tables not in Fabric |
| Budget/forecast | Import | Data from Excel or external source |
Key consideration: Composite model queries involving both DL and Import tables may have different performance characteristics. Test with production data volumes.
references/fabric-architecture-patterns.md -- Medallion architecture, data mesh patterns, and Fabric workspace design strategiesWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
microsoft-fabric, power-bi, direct-lake, onelake, medallion-architecture, sempy
10 skills in this plugin
/dax-masteryDAX (Data Analysis Expressions) mastery for Power BI semantic models.
PROACTIVELY activate for: (1) writing DAX measures or calculated columns, (2) CALCULATE, FILTER, ALL, REMOVEFILTERS context-modification functions, (3) understanding filter context vs row context vs context transition, (4) time intelligence (SAMEPERIODLASTYEAR, DATEADD, YTD/MTD, TOTALYTD, DATESBETWEEN), (5) iterators (SUMX, AVERAGEX, FILTER), (6) variables (VAR/RETURN) and DAX optimization, (7) calculation groups, field parameters, and visual calculations, (8) WINDOW/INDEX/OFFSET/ORDERBY/PARTITIONBY/MATCHBY (window functions), (9) DAX user-defined functions (UDF), (10) DAX patterns for ratios, running totals, ranking.
Provides: measure templates, time-intelligence patterns, optimization techniques (variables, FILTER vs CALCULATETABLE), context-transition explainers, and reference for window functions and calculation groups.
/deployment-adminPower BI deployment, CI/CD, governance, and administration.
PROACTIVELY activate for: (1) Power BI deployment pipelines (Service deployment pipelines, fabric-cicd, custom workflows), (2) CI/CD for Power BI via GitHub Actions or Azure DevOps, (3) workspace management and roles, (4) row-level security (RLS) and object-level security (OLS), (5) capacity management (Premium, PPU, Fabric SKUs F2-F2048), (6) tenant settings and governance, (7) Power BI Report Server deployments, (8) service principal setup for automation, (9) data-gateway management.
Provides: deployment-pipeline templates, GitHub Actions and Azure DevOps YAML, RLS/OLS implementation patterns, capacity sizing guidance, and service-principal auth recipes.
/performance-optimizationPower BI performance optimization for slow reports, models, and queries.
PROACTIVELY activate for: (1) report is slow or visuals take forever to load, (2) DAX Studio and VertiPaq Analyzer profiling, (3) Performance Analyzer in Power BI Desktop, (4) optimizing slow DAX measures, (5) slow visuals diagnosis, (6) aggregations and composite-model tuning, (7) query reduction techniques (visual settings, top N), (8) model size reduction (cardinality, calculated columns, summary tables), (9) VertiPaq compression tuning, (10) Direct Lake performance and fallback rules, (11) large-dataset (10GB+) optimization.
Provides: profiling workflow with DAX Studio, VertiPaq compression checklist, aggregation-table patterns, model-size reduction techniques, and end-to-end performance investigation playbook.
/powerbi-coreCore Power BI data modeling, source connectivity, and platform fundamentals.
PROACTIVELY activate for: (1) Power BI data modeling and star-schema design, (2) relationships (active/inactive, bidirectional, USERELATIONSHIP), (3) data-source selection (DirectQuery vs Import vs Direct Lake vs composite), (4) incremental refresh setup, (5) gateway configuration (on-prem and VNet gateways), (6) streaming datasets and push-data scenarios, (7) Dataflow Gen2 basics, (8) Power BI common gotchas and pitfalls (bidirectional filtering, AutoExist, blank-row), (9) workspace identity and OAuth2 / service-principal auth, (10) semantic model architecture review.
Provides: star-schema templates, mode-selection matrix, incremental refresh recipe, gateway setup steps, and a common-gotchas reference.
/power-query-mPower Query M language for ETL, transformations, and connector authoring.
PROACTIVELY activate for: (1) writing Power Query M code, (2) query folding and Native Query verification, (3) data transformations (merge, append, pivot, unpivot, split column), (4) custom connector development, (5) Power Query parameters and dynamic source patterns, (6) performance optimization (folding, query reduction, partition strategy), (7) Table.TransformColumns, List.Generate, Record.Field functions, (8) error handling in M (try/otherwise, error records), (9) mashup engine internals, (10) ETL pipelines from folder/SharePoint/database sources.
Provides: M language reference, query-folding diagnosis, transformation recipes, dynamic source patterns, error-handling templates, and performance tuning techniques.
/programmatic-developmentProgrammatic Power BI development with PBIR, PBIP, TMDL, TOM, and fabric-cicd.
PROACTIVELY activate for: (1) creating Power BI reports programmatically (PBIR enhanced report format), (2) PBIR vs PBIR-Legacy selection (2026 default), (3) PBIP developer mode and Power BI project files, (4) Tabular Object Model (TOM) / .NET SDK scripting, (5) Tabular Editor scripting (C# scripts, advanced scripting), (6) pbi-tools workflows, (7) fabric-cicd Python deployments (FabricWorkspace, publish_all_items), (8) Fabric CLI (fab deploy), (9) Semantic Link / sempy / semantic-link-labs, (10) generating PBIX programmatically, (11) parameter.yml for environment-specific deployments, (12) ALM Toolkit.
Provides: PBIR/PBIP project templates, fabric-cicd deploy.py, Tabular Editor scripting recipes, parameter.yml patterns, and end-to-end programmatic workflows.
npx claudepluginhub josiahsiegel/claude-plugin-marketplace --plugin powerbi-masterOther plugins' skills for the same job