Skip to content

[codex] Fix v1.12 Python SDK overview examples#243

Open
ayush-shah wants to merge 2 commits into
mainfrom
codex/fix-python-sdk-doc-examples
Open

[codex] Fix v1.12 Python SDK overview examples#243
ayush-shah wants to merge 2 commits into
mainfrom
codex/fix-python-sdk-doc-examples

Conversation

@ayush-shah
Copy link
Copy Markdown
Member

@ayush-shah ayush-shah commented May 19, 2026

What changed

  • Updated the v1.12.x Python SDK overview pages to use the implemented plural facade classes and configure(...) connection flow.
  • Replaced stale auto_paging_iterable(), TableListParams, update(id, entity), singular facade, and unavailable facade patch examples with list_all(), keyword-based list(...), update(entity), and lower-level client().ometa where needed.
  • Updated Tags, Lineage, and ML Model guides to cover current SDK scenarios: classifications/tags, table tags, column tags, direct lineage, pipeline-backed lineage details, ML model CRUD, and explicit ML model lineage.
  • Added clarification notes to the generated lower-level metadata.ingestion.ometa API reference pages so mixin methods are not mistaken for current metadata.sdk facade methods.
  • Fixed Python SDK copy typos in affected pages.

Why

The published v1.12.x Python SDK docs contained examples that do not match the Python SDK shipped in openmetadata-ingestion==1.12.6.2, causing import and attribute errors for users following the docs.

Validation

  • Installed openmetadata-ingestion==1.12.6.2 in a temporary Python 3.12 venv and validated the documented SDK paths against https://sandbox-beta.open-metadata.org/api using a temporary script.
  • The sandbox script verified plural facades, absent old APIs, Tables.list, Tables.list_all, Tables.retrieve_by_name, Tables.update(entity), owner updates via EntityReferenceList, table tags, column tags, table lineage, pipeline lineage details, MLModels, lower-level service creation through client().ometa, and cleanup for all temporary entities.
  • Parsed changed MDX Python fenced blocks with ast.parse where applicable.
  • Ran git diff --check.
  • Searched the hand-authored SDK docs for stale positive examples of the removed APIs. Remaining patch/lineage/mlmodel mixin references are lower-level metadata.ingestion.ometa API reference pages and now include explicit clarification notes.

@ayush-shah ayush-shah marked this pull request as ready for review May 19, 2026 19:49
Copilot AI review requested due to automatic review settings May 19, 2026 19:49
@mintlify
Copy link
Copy Markdown

mintlify Bot commented May 19, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
openmetadata 🟢 Ready View Preview May 19, 2026, 7:55 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Copy link
Copy Markdown
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.

Pull request overview

This PR updates the v1.12.x Python SDK documentation to match the APIs shipped in openmetadata-ingestion==1.12.6.2, replacing stale examples (older paging/list/update/patch patterns and singular facades) with the current plural facade + configure(...) flow and adding clarification where the generated API reference documents lower-level ingestion client mixins.

Changes:

  • Refresh Python SDK overview + guides to use plural facades (Tables, Tags, MLModels, etc.), configure(...), list_all(), keyword-based list(...), and update(entity).
  • Update Tags/Lineage/ML Model docs to reflect current workflows (tagging tables/columns, explicit lineage edges, ML model CRUD + lineage).
  • Add “Tip” callouts in generated API reference pages to clearly distinguish lower-level metadata.ingestion.ometa mixin methods from metadata.sdk facades; fix minor copy/typos and pin install version.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
v1.12.x/api-reference/sdk/python/overview.mdx Rewrites overview examples to plural facades, configure, new list/pagination/update patterns, and clarifies facade scope.
v1.12.x/api-reference/sdk/python/ingestion/tags.mdx Updates tagging walkthrough to SDK configure + facade CRUD and current tag/column-tag flows.
v1.12.x/api-reference/sdk/python/ingestion/lineage.mdx Fixes copy and updates lineage examples to current ID/root handling + client().ometa where facades don’t exist.
v1.12.x/api-reference/sdk/python/entities/ml-model.mdx Updates ML model guide to use MLModels facade + explicit lineage edges; refreshes requirements notes.
v1.12.x/api-reference/sdk/python/build-connector/bulk-sink.mdx Fixes minor copy/formatting in description and link section.
v1.12.x/api-reference/sdk/python/api-reference/patch-mixin.mdx Adds clarification tip that mixin methods are lower-level metadata.ingestion.ometa APIs, not metadata.sdk facades.
v1.12.x/api-reference/sdk/python/api-reference/mlmodel-mixin.mdx Adds clarification tip pointing to MLModels + metadata.sdk.api.Lineage for current SDK surface.
v1.12.x/api-reference/sdk/python/api-reference/lineage-mixin.mdx Adds clarification tip about metadata.sdk.api.Lineage vs lower-level lineage parsing APIs.
v1.12.x/api-reference/sdk/python/api-reference.mdx Adds a top-level tip clarifying the generated reference is for metadata.ingestion.ometa, and links to facade docs.
v1.12.x/api-reference/sdk/python.mdx Updates install pin, switches to configure, modernizes examples (Pydantic v2 dump, owners, delete ID/root).

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

# Use in other entity creation
if ref:
print(f"Table reference ID: {ref.id}")
print(f"Table reference ID: {ref['id']}")
@ayush-shah
Copy link
Copy Markdown
Member Author

One small SDK accuracy note on the new low-level client guidance: the doc says to use the OpenMetadata client returned by metadata.sdk.client() for lower-level patch flows. In the current SDK, client() returns the high-level wrapper, and the lower-level metadata.ingestion.ometa client is exposed as client().ometa.

Could we make that explicit, for example “use metadata.sdk.client().ometa for lower-level patch helpers,” or show a short code line? That avoids users trying client().patch(...) directly and hitting a missing-method error.

@ayush-shah
Copy link
Copy Markdown
Member Author

One SDK accuracy issue I noticed while validating against the current metadata.sdk.configure(...) implementation:

v1.12.x/api-reference/sdk/python.mdx says configure() performs a health check automatically. The current SDK initializes the OMeta client and may run version validation, but it does not call health_check() during metadata.sdk.configure(...).

Could we change this paragraph to say configure() initializes the client/version validation, and show an explicit client().ometa.health_check() call if users want to verify service health?

@ayush-shah ayush-shah linked an issue May 21, 2026 that may be closed by this pull request
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.

Documentation for Python SDK not aligned with code

2 participants