Skip to content

Conversation

@flanakin
Copy link
Collaborator

Summary

  • Fixes scheduled refresh job failures for Policy & Governance and Workload optimization Power BI reports
  • Two bugs were causing failures when Resource Graph queries returned no data:
    1. PolicyDefinitions: NullHandling empty table schema was missing subscriptionId column that the query projects
    2. Subscriptions: Query returned Source instead of NullHandling, so the empty table fallback was never used

Root Cause

When Resource Graph queries return no data, Power BI creates an empty result. The NullHandling logic is supposed to create a properly-typed empty table with the correct schema. However:

  • PolicyDefinitions had a column mismatch (query projects subscriptionId but NullHandling didn't include it)
  • Subscriptions defined NullHandling but never returned it (typo returning Source instead)

This caused schema validation errors during scheduled refresh in Power BI Service.

Test plan

  • Deploy Governance and WorkloadOptimization reports to Power BI Service
  • Configure scheduled refresh
  • Verify refresh succeeds even when Resource Graph returns no data

Closes #1878

🤖 Generated with Claude Code

…timization (#1878)

Two bugs were causing scheduled refresh to fail when Resource Graph queries
returned no data:

1. PolicyDefinitions NullHandling was missing the subscriptionId column that
   the query projects, causing a schema mismatch

2. Subscriptions query returned Source instead of NullHandling, so the empty
   table fallback was never used

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 13, 2026 09:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

The Subscriptions, AdvisorRecommendations, and AdvisorReservationRecommendations
tables all define a type column but were missing it in the NullHandling empty
table schema. This causes schema validation failures when Resource Graph returns
no data.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@RolandKrummenacher RolandKrummenacher merged commit 3665e36 into dev Jan 13, 2026
3 of 4 checks passed
@RolandKrummenacher RolandKrummenacher deleted the fix/1878-powerbi-nullhandling branch January 13, 2026 11:11
@microsoft-github-policy-service

@all-contributors please add @flanakin for code

@allcontributors
Copy link
Contributor

@microsoft-github-policy-service[bot]

@flanakin already contributed before to code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs: Review 👀 PR that is ready to be reviewed Tool: Power BI Power BI reports

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scheduled refresh job failure for Policy & Governance and Workload optimization workbook.

5 participants