Skip to content

Add include_shared_data parameter to list_share function#1400

Open
maanijou wants to merge 3 commits into
databricks:mainfrom
maanijou:improve-share-list
Open

Add include_shared_data parameter to list_share function#1400
maanijou wants to merge 3 commits into
databricks:mainfrom
maanijou:improve-share-list

Conversation

@maanijou
Copy link
Copy Markdown

Summary

Adds include_shared_data param to list_shares function just like get function so that while fetching the shareinfo, their object info is also fetched.

Why

Currently we can use list_shares to fetch share info but unlike get function, there's no way to also specify that we also need to get shared_data information (objects key).

The PR adds include_shared_data param just like get function so that user can indicate the need to getch shared data.

Alternative to this approach is to use get function independently on each share again to fetch shared_data for them which is an extra unnecessary step since we can do it inside list_shares.

What changed

Interface changes

Adds an optional param to list_shares function with default to None (not changing existing behaviours). If this param is provided with True value, it will fetch the sahred data:

w = WorkspaceClient()

shares = w.providers.list_shares(name=created.name, include_shared_data=True)
# using include_shared_data=True, shared data information is also fetched and objects key is not empty anymore

Behavioral changes

Existing behavior is not changed.

Internal changes

Addition of extra param: include_shared_data with default value None.

How is this tested?

Built the package and ran locally to fetch the shared data (no unit test available for this module at the moment)

@github-actions
Copy link
Copy Markdown

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-py

Inputs:

  • PR number: 1400
  • Commit SHA: fddde17986c94f0643559cd288bfde222b5b337f

Checks will be approved automatically on success.

@maanijou maanijou marked this pull request as ready for review April 22, 2026 12:24
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