Skip to content

Add notebook-governance-sempy: tenant-wide lakehouse table inventory using SemPy - #604

Open
dataassets1 wants to merge 4 commits into
microsoft:mainfrom
dataassets1:fabric-notebook-sempy
Open

Add notebook-governance-sempy: tenant-wide lakehouse table inventory using SemPy#604
dataassets1 wants to merge 4 commits into
microsoft:mainfrom
dataassets1:fabric-notebook-sempy

Conversation

@dataassets1

Copy link
Copy Markdown

Pull Request (PR) description

Supersedes #509 — same tool, rewritten with Semantic Link (SemPy) instead of raw Fabric REST API calls. All review feedback from #509 and #483 is incorporated.

Adds samples/notebook-governance-sempy/ — the first of a planned set of governance notebooks built on SemPy / the Fabric REST API. This notebook builds a tenant-wide inventory of all lakehouse tables and registers it as a Spark temp view (fabric_lakehouse_inventory) for direct SQL querying.

Why the rewrite: sempy.fabric handles auth, pagination, and retries natively, reducing the code to a fraction of the REST version while staying aligned with the library Microsoft ships in Fabric notebooks.

Added

  • samples/notebook-governance-sempy/ — notebook + README (usage, output schema, example queries, known limitations)

Task list

  • The PR represents a single logical change.
  • CHANGELOG entry — N/A, repository has no CHANGELOG.md
  • Local clean build — N/A for notebook samples
  • Comment-based help added/updated (quick tutorial in the notebook header)
  • Examples appropriately added/updated (example queries in README)
  • Unit tests — N/A for notebook samples
  • Integration tests — manually validated in a live Fabric tenant (temp view created, failure summary reported)
  • Documentation added/updated (README.md)
  • Code follows the contribution guidelines

Copilot AI review requested due to automatic review settings July 14, 2026 01:33

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 SemPy-based governance notebook sample that inventories lakehouse tables tenant-wide (scoped to the executing identity) and exposes the results as a Spark temp view (fabric_lakehouse_inventory) for ad-hoc SQL querying inside Microsoft Fabric notebooks.

Changes:

  • Added get-tables.py to enumerate workspaces → lakehouses → tables via sempy.fabric and publish the inventory as a Spark temp view.
  • Added README documentation describing usage, output, example query, and known limitations.

Reviewed changes

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

File Description
samples/notebook-governance-sempy/get-tables.py New SemPy-driven inventory notebook script that builds and registers the fabric_lakehouse_inventory temp view.
samples/notebook-governance-sempy/README.md Documentation for running the notebook and querying the resulting inventory view.

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

Comment thread samples/notebook-governance-sempy/get-tables.py Outdated
Comment thread samples/notebook-governance-sempy/get-tables.py Outdated
Comment thread samples/notebook-governance-sempy/get-tables.py Outdated
Comment thread samples/notebook-governance-sempy/get-tables.py Outdated
dataassets1 and others added 3 commits July 13, 2026 19:45
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@dataassets1

Copy link
Copy Markdown
Author

Copilot's comments are resolved.
Tested in a live Fabric tenant: temp view created, failure summary reported.
Ready for review — thanks!

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