Skip to content

docs: make transaction examples opt in and runnable - #1088

Open
aakash-saravanan-db wants to merge 1 commit into
mainfrom
aakash-saravanan_data/docs/mst-opt-in-20261202
Open

aakash-saravanan-db wants to merge 1 commit into
mainfrom
aakash-saravanan_data/docs/mst-opt-in-20261202

Conversation

@aakash-saravanan-db

Copy link
Copy Markdown
Collaborator

What type of PR is this?

  • Other

Description

The transaction examples omit ignore_transactions=False. With the default True, assigning connection.autocommit and calling commit() are no-ops, while rollback() raises NotSupportedError. Following the examples therefore does not enable manual transactions.

Add the opt-in to every transaction connection example and scope the guide's behavior to enabled transaction APIs. The runnable example creates catalog-managed Delta tables in autocommit mode, runs the transfer DML in manual mode, and restores autocommit before verifying the balances and transfer. Correct the guide's table property to delta.feature.catalogManaged='supported'. Runtime behavior and dependencies are unchanged.

How is this tested?

  • Manually

Python syntax parsing passed for the runnable example and all 20 Python snippets in the guide and README. All three transaction connection examples explicitly opt in. Black and diff whitespace checks passed, as did the pre-commit and commit-message secret scans; hook lint selection skipped this unrecognized project.

The corrected example passed once on staging Databricks SQL in each of the Thrift and use_kernel=True modes with installed connector 4.10.0 and kernel 1.5.0. Only runtime connection settings and unique table identifiers were substituted in a disposable copy. Assertions checked balances of 900 and 600, the transfer of 100, visibility from an independent connection, and the catalog-managed table property. All four owned tables were removed. The existing 40-case MST suite was not rerun.

Related Tickets & Documents

None.

Scope transaction guidance to the explicit opt-in and document compatibility defaults. Create catalog-managed Delta tables in autocommit mode and restore that mode before verifying the transfer results.

Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

✅ No issues identified.

This branch was previously deployed

1 inactive deployment
azure-prod — 45ec3bce Deployed Dec 2, 2026 by aakash-saravanan-db via review #900
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.

1 participant