Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

class databricks.sdk.service.sharing.ProvidersAPI documentation code example missing parameter authentication_type #865

Open
gabrielsylvain-db opened this issue Jan 21, 2025 · 1 comment
Labels
Bug The issue is a bug. documentation Improvements or additions to documentation Triaged The issue has been reviewed. Issues without a “Triaged” label require triage/review.

Comments

@gabrielsylvain-db
Copy link

The examples provided in the public documentation for the class databricks.sdk.service.sharing.ProvidersAPI do not include parameter authentication_type.

Current Behaviour
Running the following code example, that is from the public documentation:

import time

from databricks.sdk import WorkspaceClient

w = WorkspaceClient()

public_share_recipient = """{
        "shareCredentialsVersion":1,
        "bearerToken":"dapiabcdefghijklmonpqrstuvwxyz",
        "endpoint":"https://sharing.delta.io/delta-sharing/"
    }
"""

created = w.providers.create(name=f'sdk-{time.time_ns()}', recipient_profile_str=public_share_recipient)

# cleanup
w.providers.delete(name=created.name)

lead to the following error:

Image

Expected behaviour
Expected behaviour is for the code example to work. In this case, a working example would be:

import time

from databricks.sdk import WorkspaceClient
from databricks.sdk.service.sharing import AuthenticationType

w = WorkspaceClient()

public_share_recipient = """{
        "shareCredentialsVersion":1,
        "bearerToken":"dapiabcdefghijklmonpqrstuvwxyz",
        "endpoint":"https://sharing.delta.io/delta-sharing/"
    }
"""

created = w.providers.create(name=f'sdk-{time.time_ns()}', authentication_type=AuthenticationType.TOKEN, recipient_profile_str=public_share_recipient)

# cleanup
w.providers.delete(name=created.name)

Note that other examples in this section of the documentation are lacking this parameters. Also recipients documentation seems to be missing this parameter.

@parthban-db parthban-db added Bug The issue is a bug. documentation Improvements or additions to documentation Triaged The issue has been reviewed. Issues without a “Triaged” label require triage/review. labels Jan 28, 2025
@parthban-db
Copy link
Contributor

Thanks for reporting the issue. It seems that documentation is not upto date. I will update the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug The issue is a bug. documentation Improvements or additions to documentation Triaged The issue has been reviewed. Issues without a “Triaged” label require triage/review.
Projects
None yet
Development

No branches or pull requests

2 participants