[ISSUE] Docs - Example uses older .execute instead of .execute_statement api

Open Beginner friendly
#341 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
72/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
documentation

Research direction

Open the workspace/grants.html documentation page and find its three updates examples using w.statement_execution.execute. Replace those references with the execute_statement API, then run the documentation linting or compilation check mentioned in the issue. Done means all three examples use the current API and are compilable or runnable.

Written by the indexing model from the issue text.

Description

documentation Triaged

Description
The https://databricks-sdk-py.readthedocs.io/en/latest/workspace/grants.html page with the updates example uses:

_ = w.statement_execution.execute(warehouse_id=os.environ["TEST_DEFAULT_WAREHOUSE_ID"],
                                  catalog=created_catalog.name,
                                  schema=created_schema.name,
                                  statement="CREATE TABLE %s AS SELECT 2+2 as four" % (table_name)).result()

api call. The correct api call is w.statement_execution.execute_statement
There are 3 examples of this 'old' api call on this page.

Reproduction
Copy paste example, and check with linting program.

Expected behavior
Change example to make it compilable / runnable

Other Information

  • Version: 0.7.0
Dominant language
Python
Stars
568
Forks
217
Avg merge
1h 1m
Merged PRs (30d)
8

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from databricks/databricks-sdk-py

All issues in databricks/databricks-sdk-py

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.