30
loading...
This website collects cookies to deliver better user experience
I have stored the entire JDBC connection string in this case but you can choose to just store the password as well.
You can also authenticate using your user Azure Active Directory credential.
Get
permission on Secret
:I will be using pyspark
in Synapse Spark pools as an example.
TokenLibrary.getSecret()
function. Here is a python example but same applies to C# or Scala.SalesLT.Customer
table (part of AdventureWorks sample database), you can use the following:url = TokenLibrary.getSecret("<Azure Key Vault name>", "<Secret name>", "<Linked Service name>")
dbtable = "SalesLT.Customer"
customers = spark.read \
.format("com.microsoft.sqlserver.jdbc.spark") \
.option("url", url) \
.option("dbtable", dbtable) \
.load()
print(customers.count())
customers.show(5)