-
Notifications
You must be signed in to change notification settings - Fork 242
add support for Databricks #143
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
Conversation
|
@DCKcode @SimonBarendse for sec review. |
I agree that the product can be opinionated towards the desired option. This also provides the best experience for the most common case of following Databricks recommended method of authentication (more closely matching wording). I'd like to consider if we can even go one step further and choose to not support username+password at all. This will allow us to set the personal access token as required, which has the following advantages:
|
SimonBarendse
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for an excellent contribution @bsamseth! Really appreciate your notes, makes it easier for us to think along and discuss. 🙌
I've also commented a small suggestion based on code review.
|
I'd indeed remove the username and password fields and make the token field required. If we want to support both credential types, then we should create separate CredentialType structs for them. |
SimonBarendse
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again! 💚
This adds support for the Databricks CLI.
This CLI needs to know a "host" URL to the instance of Databricks you're working with, as well as your credentials that are specific to that instance. Personal access tokens are they primary way to authenticate, while username+password is possible but discouraged.
I've tested this on my own config, and both import and usage seems to work just fine 💯 Please let me know if you'd like to see more test cases or anything else before accepting.
A couple notes:
op plugin list, this plugin shows up withREQUIRED FIELDS: host. This is because while you do need to provide either a token or a username and password, neither of them can be marked as required on their own. Probably not a big deal, but resolving it can't really be done without making some changes toschema.CredentialFieldand related code.jobs-api-version = 2.xline. This is ignored by the plugin with the following reasoning:databricks jobssubcommand.