Created
October 21, 2019 08:16
-
-
Save htjelsma/a4d0e27a9afdd2fbb6aafa456f6cf7ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Get the credentials from the Keyvault that a scope was defined for using the | |
#Databricks CLI. See: https://docs.azuredatabricks.net/security/secrets/secret-scopes.html | |
#alternatively, hard-code the credentials here: | |
jdbcUrl = dbutils.secrets.get(scope="JDBC", key="url") | |
jdbcUsername = dbutils.secrets.get(scope="JDBC", key="username") | |
jdbcPassword = dbutils.secrets.get(scope="JDBC", key="password") | |
#create an object with the credentials that we can pass on to the spark dataframe reader | |
connectionProperties = { | |
"user" : jdbcUsername, | |
"password" : jdbcPassword, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment