Azure Key Vault with Databricks

https://<databricks-instance>#secrets/createScope. Post successful authentication you will get the databricks instance like below https://xxxxxxxxxxxx.x.azuredatabricks.net/#secrets/createScope
Define the Scope Name. We will use this scope name in the codebase
import mysql.connectorUsername = dbutils.secrets.get(scope = "scope_name",key = "user")
Password = dbutils.secrets.get(scope = "scope_name",key = "password")
mydb = mysql.connector.connect(
host="mysql.xxxx.xxx",
user=Username,
password=Password
)
mycursor = mydb.cursor()
mycursor.execute("SHOW DATABASES")
for x in mycursor:
print(x)

--

--

--

DevOps Engineer with 10+ years of experience in the IT Industry. In-depth experience in building highly complex, scalable, secure and distributed systems.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Edge Detection

OpenTelemetry Specification v1.0.0, Tracing Edition

Prediction with Precision Enables the Reservation of Resources for Multi-Cloud Management

What is Aleo and how we can use it?

WebRTC Architectures: Mesh, MCU, and SFU

EAGON SWAP TOKEN DETAILS FOR PRIVATE SALE AND IDO EVENTS.

How to Set up a Raspberry Pi Camera

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ankur

Ankur

DevOps Engineer with 10+ years of experience in the IT Industry. In-depth experience in building highly complex, scalable, secure and distributed systems.

More from Medium

Securing Azure Synapse Workspaces? Beware of One Inescapable Networking Blocker.

Azure Data Factory Control of a Virtual Machine

Mounting Azure Blob Storage to DBFS

A roundtrip on Modern Data Platform with Azure Synapse Analytics and Azure DevOps — Part One

One common solution to ingest, analyse and store data