/vibe:ghcopilot-instr-power-bi-devops-alm-best-practicesfrom vibe
Guides Power BI DevOps and ALM with CI/CD pipelines, deployment automation, version control, and PBIP project structure best practices.
Ships in vibe. 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.
None: SKILL.md is the whole skill.
This document provides comprehensive instructions for implementing DevOps practices, CI/CD pipelines, and Application Lifecycle Management (ALM) for Power BI solutions, based on Microsoft's recommended patterns and best practices.
// Power BI project file organization
├── Model/
│ ├── model.tmdl
│ ├── tables/
│ │ ├── FactSales.tmdl
│ │ └── DimProduct.tmdl
│ ├── relationships/
│ │ └── relationships.tmdl
│ └── measures/
│ └── measures.tmdl
├── Report/
│ ├── report.json
│ ├── pages/
│ │ ├── ReportSection1/
│ │ │ ├── page.json
│ │ │ └── visuals/
│ │ └── pages.json
│ └── bookmarks/
└── .git/
# Initialize Power BI project with Git
git init
git add .
git commit -m "Initial Power BI project structure"
# Create feature branch for development
git checkout -b feature/new-dashboard
git add Model/tables/NewTable.tmdl
git commit -m "Add new dimension table"
# Merge and deploy workflow
git checkout main
git merge feature/new-dashboard
git tag -a v1.2.0 -m "Release version 1.2.0"
# Automated deployment using Power BI REST API
$url = "pipelines/{0}/Deploy" -f "Insert your pipeline ID here"
$body = @{
sourceStageOrder = 0 # Development (0), Test (1)
datasets = @(
@{sourceId = "Insert your dataset ID here" }
)
reports = @(
@{sourceId = "Insert your report ID here" }
)
dashboards = @(
@{sourceId = "Insert your dashboard ID here" }
)
options = @{
# Allows creating new item if needed on the Test stage workspace
allowCreateArtifact = $TRUE
# Allows overwriting existing item if needed on the Test stage workspace
allowOverwriteArtifact = $TRUE
}
} | ConvertTo-Json
$deployResult = Invoke-PowerBIRestMethod -Url $url -Method Post -Body $body | ConvertFrom-Json
# Poll deployment status
$url = "pipelines/{0}/Operations/{1}" -f "Insert your pipeline ID here",$deployResult.id
$operation = Invoke-PowerBIRestMethod -Url $url -Method Get | ConvertFrom-Json
while($operation.Status -eq "NotStarted" -or $operation.Status -eq "Executing")
{
# Sleep for 5 seconds
Start-Sleep -s 5
$operation = Invoke-PowerBIRestMethod -Url $url -Method Get | ConvertFrom-Json
}
# Azure DevOps pipeline for Power BI deployment
trigger:
- main
pool:
vmImage: windows-latest
steps:
- task: CopyFiles@2
inputs:
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
CleanTargetFolder: true
ignoreMakeDirErrors: true
displayName: 'Copy files from Repo'
- task: PowerPlatformToolInstaller@2
inputs:
DefaultVersion: true
- task: PowerPlatformExportData@2
inputs:
authenticationType: 'PowerPlatformSPN'
PowerPlatformSPN: 'PowerBIServiceConnection'
Environment: '$(BuildTools.EnvironmentUrl)'
SchemaFile: '$(Build.ArtifactStagingDirectory)\source\schema.xml'
DataFile: 'data.zip'
displayName: 'Export Power BI metadata'
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
# Deploy Power BI project using FabricPS-PBIP
$workspaceName = "$(WorkspaceName)"
$pbipSemanticModelPath = "$(Build.ArtifactStagingDirectory)\$(ProjectName).SemanticModel"
$pbipReportPath = "$(Build.ArtifactStagingDirectory)\$(ProjectName).Report"
# Download and install FabricPS-PBIP module
New-Item -ItemType Directory -Path ".\modules" -ErrorAction SilentlyContinue | Out-Null
@("https://raw.githubusercontent.com/microsoft/Analysis-Services/master/pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1",
"https://raw.githubusercontent.com/microsoft/Analysis-Services/master/pbidevmode/fabricps-pbip/FabricPS-PBIP.psd1") |% {
Invoke-WebRequest -Uri $_ -OutFile ".\modules\$(Split-Path $_ -Leaf)"
}
Import-Module ".\modules\FabricPS-PBIP" -Force
# Authenticate and deploy
Set-FabricAuthToken -reset
$workspaceId = New-FabricWorkspace -name $workspaceName -skipErrorIfExists
$semanticModelImport = Import-FabricItem -workspaceId $workspaceId -path $pbipSemanticModelPath
$reportImport = Import-FabricItem -workspaceId $workspaceId -path $pbipReportPath -itemProperties @{"semanticModelId" = $semanticModelImport.Id}
displayName: 'Deploy to Power BI Service'
# Complete PowerShell deployment script
# Parameters
$workspaceName = "[Workspace Name]"
$pbipSemanticModelPath = "[PBIP Path]\[Item Name].SemanticModel"
$pbipReportPath = "[PBIP Path]\[Item Name].Report"
$currentPath = (Split-Path $MyInvocation.MyCommand.Definition -Parent)
Set-Location $currentPath
# Download modules and install
New-Item -ItemType Directory -Path ".\modules" -ErrorAction SilentlyContinue | Out-Null
@("https://raw.githubusercontent.com/microsoft/Analysis-Services/master/pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1",
"https://raw.githubusercontent.com/microsoft/Analysis-Services/master/pbidevmode/fabricps-pbip/FabricPS-PBIP.psd1") |% {
Invoke-WebRequest -Uri $_ -OutFile ".\modules\$(Split-Path $_ -Leaf)"
}
if(-not (Get-Module Az.Accounts -ListAvailable)) {
Install-Module Az.Accounts -Scope CurrentUser -Force
}
Import-Module ".\modules\FabricPS-PBIP" -Force
# Authenticate
Set-FabricAuthToken -reset
# Ensure workspace exists
$workspaceId = New-FabricWorkspace -name $workspaceName -skipErrorIfExists
# Import the semantic model and save the item id
$semanticModelImport = Import-FabricItem -workspaceId $workspaceId -path $pbipSemanticModelPath
# Import the report and ensure its bound to the previous imported semantic model
$reportImport = Import-FabricItem -workspaceId $workspaceId -path $pbipReportPath -itemProperties @{"semanticModelId" = $semanticModelImport.Id}
{
"environments": {
"development": {
"workspaceId": "dev-workspace-id",
"dataSourceUrl": "dev-database.database.windows.net",
"refreshSchedule": "manual",
"sensitivityLabel": "Internal"
},
"test": {
"workspaceId": "test-workspace-id",
"dataSourceUrl": "test-database.database.windows.net",
"refreshSchedule": "daily",
"sensitivityLabel": "Internal"
},
"production": {
"workspaceId": "prod-workspace-id",
"dataSourceUrl": "prod-database.database.windows.net",
"refreshSchedule": "hourly",
"sensitivityLabel": "Confidential"
}
}
}
# Environment-specific parameter management
param(
[Parameter(Mandatory=$true)]
[ValidateSet("dev", "test", "prod")]
[string]$Environment,
[Parameter(Mandatory=$true)]
[string]$WorkspaceName,
[Parameter(Mandatory=$false)]
[string]$DataSourceServer
)
# Load environment-specific configuration
$configPath = ".\config\$Environment.json"
$config = Get-Content $configPath | ConvertFrom-Json
# Update connection strings based on environment
$connectionString = "Data Source=$($config.dataSourceUrl);Initial Catalog=$($config.database);Integrated Security=SSPI;"
# Deploy with environment-specific settings
Write-Host "Deploying to $Environment environment..."
Write-Host "Workspace: $($config.workspaceId)"
Write-Host "Data Source: $($config.dataSourceUrl)"
# Automated data quality validation
function Test-PowerBIDataQuality {
param(
[string]$WorkspaceId,
[string]$DatasetId
)
# Test 1: Row count validation
$rowCountQuery = @"
EVALUATE
ADDCOLUMNS(
SUMMARIZE(Sales, Sales[Year]),
"RowCount", COUNTROWS(Sales),
"ExpectedMin", 1000,
"Test", IF(COUNTROWS(Sales) >= 1000, "PASS", "FAIL")
)
"@
# Test 2: Data freshness validation
$freshnessQuery = @"
EVALUATE
ADDCOLUMNS(
ROW("LastRefresh", MAX(Sales[Date])),
"DaysOld", DATEDIFF(MAX(Sales[Date]), TODAY(), DAY),
"Test", IF(DATEDIFF(MAX(Sales[Date]), TODAY(), DAY) <= 1, "PASS", "FAIL")
)
"@
# Execute tests
$rowCountResult = Invoke-PowerBIRestMethod -Url "groups/$WorkspaceId/datasets/$DatasetId/executeQueries" -Method Post -Body (@{queries=@(@{query=$rowCountQuery})} | ConvertTo-Json)
$freshnessResult = Invoke-PowerBIRestMethod -Url "groups/$WorkspaceId/datasets/$DatasetId/executeQueries" -Method Post -Body (@{queries=@(@{query=$freshnessQuery})} | ConvertTo-Json)
return @{
RowCountTest = $rowCountResult
FreshnessTest = $freshnessResult
}
}
# Performance benchmark testing
function Test-PowerBIPerformance {
param(
[string]$WorkspaceId,
[string]$ReportId
)
$performanceTests = @(
@{
Name = "Dashboard Load Time"
Query = "EVALUATE TOPN(1000, Sales)"
MaxDurationMs = 5000
},
@{
Name = "Complex Calculation"
Query = "EVALUATE ADDCOLUMNS(Sales, 'ComplexCalc', [Sales] * [Profit Margin %])"
MaxDurationMs = 10000
}
)
$results = @()
foreach ($test in $performanceTests) {
$startTime = Get-Date
$result = Invoke-PowerBIRestMethod -Url "groups/$WorkspaceId/datasets/$DatasetId/executeQueries" -Method Post -Body (@{queries=@(@{query=$test.Query})} | ConvertTo-Json)
$endTime = Get-Date
$duration = ($endTime - $startTime).TotalMilliseconds
$results += @{
TestName = $test.Name
Duration = $duration
Passed = $duration -le $test.MaxDurationMs
Threshold = $test.MaxDurationMs
}
}
return $results
}
{
"workspace": {
"name": "Production Analytics",
"description": "Production Power BI workspace for sales analytics",
"capacityId": "A1-capacity-id",
"users": [
{
"emailAddress": "[email protected]",
"accessRight": "Admin"
},
{
"emailAddress": "[email protected]",
"accessRight": "Member",
"principalType": "App"
}
],
"settings": {
"datasetDefaultStorageFormat": "Large",
"blockResourceKeyAuthentication": true
}
},
"datasets": [
{
"name": "Sales Analytics",
"refreshSchedule": {
"enabled": true,
"times": ["06:00", "12:00", "18:00"],
"days": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
"timeZone": "UTC"
},
"datasourceCredentials": {
"credentialType": "OAuth2",
"encryptedConnection": "Encrypted"
}
}
]
}
# Azure Key Vault integration for secrets
function Get-PowerBICredentials {
param(
[string]$KeyVaultName,
[string]$Environment
)
# Retrieve secrets from Key Vault
$servicePrincipalId = Get-AzKeyVaultSecret -VaultName $KeyVaultName -Name "PowerBI-ServicePrincipal-Id-$Environment" -AsPlainText
$servicePrincipalSecret = Get-AzKeyVaultSecret -VaultName $KeyVaultName -Name "PowerBI-ServicePrincipal-Secret-$Environment" -AsPlainText
$tenantId = Get-AzKeyVaultSecret -VaultName $KeyVaultName -Name "PowerBI-TenantId-$Environment" -AsPlainText
return @{
ServicePrincipalId = $servicePrincipalId
ServicePrincipalSecret = $servicePrincipalSecret
TenantId = $tenantId
}
}
# Authenticate using retrieved credentials
$credentials = Get-PowerBICredentials -KeyVaultName "PowerBI-KeyVault" -Environment "Production"
$securePassword = ConvertTo-SecureString $credentials.ServicePrincipalSecret -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential($credentials.ServicePrincipalId, $securePassword)
Connect-PowerBIServiceAccount -ServicePrincipal -Credential $credential -TenantId $credentials.TenantId
# Multi-stage release pipeline
stages:
- stage: Build
displayName: 'Build Stage'
jobs:
- job: Build
steps:
- task: PowerShell@2
displayName: 'Validate Power BI Project'
inputs:
targetType: 'inline'
script: |
# Validate PBIP structure
if (-not (Test-Path "Model\model.tmdl")) {
throw "Missing model.tmdl file"
}
# Validate required files
$requiredFiles = @("Report\report.json", "Model\tables")
foreach ($file in $requiredFiles) {
if (-not (Test-Path $file)) {
throw "Missing required file: $file"
}
}
Write-Host "✅ Project validation passed"
- stage: DeployTest
displayName: 'Deploy to Test'
dependsOn: Build
condition: succeeded()
jobs:
- deployment: DeployTest
environment: 'PowerBI-Test'
strategy:
runOnce:
deploy:
steps:
- template: deploy-powerbi.yml
parameters:
environment: 'test'
workspaceName: '$(TestWorkspaceName)'
- stage: DeployProd
displayName: 'Deploy to Production'
dependsOn: DeployTest
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
jobs:
- deployment: DeployProd
environment: 'PowerBI-Production'
strategy:
runOnce:
deploy:
steps:
- template: deploy-powerbi.yml
parameters:
environment: 'prod'
workspaceName: '$(ProdWorkspaceName)'
# Automated rollback mechanism
function Invoke-PowerBIRollback {
param(
[string]$WorkspaceId,
[string]$BackupVersion,
[string]$BackupLocation
)
Write-Host "Initiating rollback to version: $BackupVersion"
# Step 1: Export current state as emergency backup
$emergencyBackup = "emergency-backup-$(Get-Date -Format 'yyyyMMdd-HHmmss')"
Export-PowerBIReport -WorkspaceId $WorkspaceId -BackupName $emergencyBackup
# Step 2: Restore from backup
$backupPath = Join-Path $BackupLocation "$BackupVersion.pbix"
if (Test-Path $backupPath) {
Import-PowerBIReport -WorkspaceId $WorkspaceId -FilePath $backupPath -ConflictAction "Overwrite"
Write-Host "✅ Rollback completed successfully"
} else {
throw "Backup file not found: $backupPath"
}
# Step 3: Validate rollback
Test-PowerBIDataQuality -WorkspaceId $WorkspaceId
}
# Post-deployment validation
function Test-DeploymentHealth {
param(
[string]$WorkspaceId,
[array]$ExpectedReports,
[array]$ExpectedDatasets
)
$healthCheck = @{
Status = "Healthy"
Issues = @()
Timestamp = Get-Date
}
# Check reports
$reports = Get-PowerBIReport -WorkspaceId $WorkspaceId
foreach ($expectedReport in $ExpectedReports) {
if (-not ($reports.Name -contains $expectedReport)) {
$healthCheck.Issues += "Missing report: $expectedReport"
$healthCheck.Status = "Unhealthy"
}
}
# Check datasets
$datasets = Get-PowerBIDataset -WorkspaceId $WorkspaceId
foreach ($expectedDataset in $ExpectedDatasets) {
$dataset = $datasets | Where-Object { $_.Name -eq $expectedDataset }
if (-not $dataset) {
$healthCheck.Issues += "Missing dataset: $expectedDataset"
$healthCheck.Status = "Unhealthy"
} elseif ($dataset.RefreshState -eq "Failed") {
$healthCheck.Issues += "Dataset refresh failed: $expectedDataset"
$healthCheck.Status = "Degraded"
}
}
return $healthCheck
}
# Teams notification for deployment status
function Send-DeploymentNotification {
param(
[string]$TeamsWebhookUrl,
[object]$DeploymentResult,
[string]$Environment
)
$color = switch ($DeploymentResult.Status) {
"Success" { "28A745" }
"Warning" { "FFC107" }
"Failed" { "DC3545" }
}
$teamsMessage = @{
"@type" = "MessageCard"
"@context" = "https://schema.org/extensions"
"summary" = "Power BI Deployment $($DeploymentResult.Status)"
"themeColor" = $color
"sections" = @(
@{
"activityTitle" = "Power BI Deployment to $Environment"
"activitySubtitle" = "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')"
"facts" = @(
@{
"name" = "Status"
"value" = $DeploymentResult.Status
},
@{
"name" = "Duration"
"value" = "$($DeploymentResult.Duration) minutes"
},
@{
"name" = "Reports Deployed"
"value" = $DeploymentResult.ReportsCount
}
)
}
)
}
Invoke-RestMethod -Uri $TeamsWebhookUrl -Method Post -Body ($teamsMessage | ConvertTo-Json -Depth 10) -ContentType 'application/json'
}
Version Control Everything
Automated Testing
Environment Isolation
Security Integration
Manual Deployments
Environment Coupling
Poor Change Management
Remember: DevOps for Power BI requires a combination of proper tooling, automated processes, and organizational discipline. Start with basic CI/CD and gradually mature your practices based on organizational needs and compliance requirements.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
power-bi, devops, alm, ci-cd, deployment-automation, version-control
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job