Using Secrets From Databricks Connect
Normally in Databricks you get secret value by calling something like password = dbutils.secrets.get("scope", "password")
but that won’t work in Databricks Connect - you will need to authorise local session to use secrets first. I’ve created a notebook in my personal workspace which prints code snippet every time I need to do that:
%scala
displayHTML(
"<b>Privileged DBUtils token (expires in 48 hours): </b> dbutils.secrets.setToken(\"" +
dbutils.notebook.getContext.apiToken.get.split("").mkString("<span/>") +
"\")")
prints something like:
Privileged DBUtils token (expires in 48 hours): dbutils.secrets.setToken("thetoken")
Em, excuse me! Have Android 📱 and use Databricks?
You might be interested in my totally free (and ad-free) Pocket Bricks . You can get it from Google Play too:
To contact me, send an email anytime or leave a comment below.