Skip to content

[pbi-fixer] Add add_last_refresh_table: add a 1-row 'Last Refresh' table with M partition - #1213

Open
KornAlexander wants to merge 3 commits into
microsoft:mainfrom
KornAlexander:feature/add-last-refresh-table
Open

[pbi-fixer] Add add_last_refresh_table: add a 1-row 'Last Refresh' table with M partition#1213
KornAlexander wants to merge 3 commits into
microsoft:mainfrom
KornAlexander:feature/add-last-refresh-table

Conversation

@KornAlexander

Copy link
Copy Markdown

Adds a sempy_labs fixer add_last_refresh_table() that add a 1-row 'Last Refresh' table with M partition.

Adds one source file (src/sempy_labs/semantic_model/_Add_Table_LastRefresh.py) plus one re-export line in the matching __init__.py. No other files touched, no shared helpers, no dependency on any other PR.

Part of the PBI Fixer contribution. Tracking issue: #1185

Copilot AI review requested due to automatic review settings May 5, 2026 12:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new semantic_model fixer, add_last_refresh_table(), intended to inspect the semantic model behind a report and add a one-row “Last Refresh” M-partition table plus a convenience measure. This fits the ongoing PBI Fixer work by adding another standalone semantic-model remediation/helper entry point.

Changes:

  • Adds src/sempy_labs/semantic_model/_Add_Table_LastRefresh.py with the new logged helper function and its supporting constants.
  • Resolves report/workspace context to the backing semantic model, supports a scan_only mode, and conditionally creates a table/column/measure.
  • Re-exports add_last_refresh_table from src/sempy_labs/semantic_model/__init__.py.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
src/sempy_labs/semantic_model/_Add_Table_LastRefresh.py New fixer implementation for detecting/adding a “Last Refresh” semantic-model table and measure.
src/sempy_labs/semantic_model/__init__.py Re-exports the new helper from the package namespace.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/sempy_labs/semantic_model/_Add_Table_LastRefresh.py Outdated
Comment thread src/sempy_labs/semantic_model/_Add_Table_LastRefresh.py
Comment thread src/sempy_labs/semantic_model/_Add_Table_LastRefresh.py
Comment thread src/sempy_labs/semantic_model/_Add_Table_LastRefresh.py
Comment thread src/sempy_labs/semantic_model/_Add_Table_LastRefresh.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants