You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
While I'm using the databricks cli from the terminal I often want to make use of the same profile for a period of hours or days, providing the --profile flag for every command isn't a great user experience because I'm likely to forget every so often and accidentally run commands against the wrong profile.
Desired user experience
I would prefer to be able to do something like databricks auth use <profile-name> at the start of my session and run subsequent commands without having to provide the --profile flag. A simple solution could be to have this command set the DATABRICKS_CONFIG_PROFILE environment variable.
The text was updated successfully, but these errors were encountered:
TheRealJimShady
changed the title
Create databricks auth 'use' command to switch profiles in a shell session
databricks auth 'use' command to switch profiles in a shell session
Feb 19, 2025
You can configure a DEFAULT profile in your ~/.databrickscfg file. The syntax would look something like:
[DEFAULT]
host = <>
token = <>
Alternatively, you can also set the environment variable yourself, maybe in your .bashrc file. Given that the workarounds exist and are simple enough, having a dedicated command for it does not seem like it's worth the added complexity.
Hi @shreyas-goenka , thanks for your quick response. I think the proposed idea would be a useful improvement for the reasons given but I accept that workarounds exist. It would be a nicer experience for the end user if they could set the working profile at the start of a session, without having to first edit a config file, set an environment variable, or pass in the same parameter for every command. That's just my opinion 🙂
Description
While I'm using the databricks cli from the terminal I often want to make use of the same profile for a period of hours or days, providing the
--profile
flag for every command isn't a great user experience because I'm likely to forget every so often and accidentally run commands against the wrong profile.Desired user experience
I would prefer to be able to do something like
databricks auth use <profile-name>
at the start of my session and run subsequent commands without having to provide the--profile
flag. A simple solution could be to have this command set theDATABRICKS_CONFIG_PROFILE
environment variable.The text was updated successfully, but these errors were encountered: