https://delta.io logo
#random
Title
m

Mohan

02/11/2023, 5:26 PM
Hi All, I am trying to create a Databricks table on top of my sql table using JDBC connection *using sql only syntax. I*t works when the credentials are hardcoded, but fails when credentials stored in azure key vault is being used for connection.
a.usr= dbutils.secrets.get(scope = "test1",key = "test1-key",)
a.pwd = dbutils.secrets.get(scope = "test1",key = "test2-key"
,)
CREATE TEMPORARY VIEW test
USING JDBC
options(driver=${<http://a.td|a.td>_driver},
url=${<http://a.td|a.td>_url},
dbtable=${<http://a.td|a.td>_tbl},
user=${a.usr},
password=${a.pwd}
)
How to format/handle the a.usr & a.pwd from extracted from azure key vault inside the JDBC options parameters in the sql way. Py way of parameterizing the credentials works, but want to do it the sql way to minimize lot of changes existing app. Thanks !
3 Views