Building Python SDK for Databricks REST API
This article is about a project I've started to work on lately. Please welcome Databricsk REST API - Python. , It is a vanilla-flavored Python SDK for Azure Databricks REST API 2.0.
"dbrest" is a python module that I created this module for the data bricks API You can download the code base from the Link: https://github.com/odbckrishna/databricks-rest-api-python/
Installation:
pip install dbrest
dbrest.connect(
domain = 'adb-dummy-adb.net',
username = [username (no mandatory)],
password = [password (no mandatory)],
bearer = 'xxxxxxxxxxxxxxxxxxxxxxx'
)
Example: "Cluster Start using Rest call"
dbrest.cluster_start(cluster_id)
{ "cluster_id" : "fgfkdgnmk-dfd", "status": "RUNNING" }
Example: "Get a list of user groups."
dbrest.get_groups()
Databricks was given API controls for almost all the services before jumping into the code base or API. Below are the tasks we can perform using the Databricks API controls.
You can access all of your data bricks assets in a data bricks workspace. The workspace provides access to data and computational resources such as clusters and jobs and orchestrates objects such as notebooks, libraries, and experiments into folders. The workspace UI, Databricks Command Line Interface (CLI), and Databricks REST API can all be used to manage the workspace. this code base will helps to deal REST API.
领英推荐
Data Governance:
Data Orchestration:
API calls can trigger the data bricks notebooks with parameters. so that it can be integrated with business process tools like Airflow, Apache Nifi, etc.
The creation of runtime jobs and their relationship with API calls.
A cluster start/reboot/stop can be a restful call.
Write a query, create the payload, execute with a restful call, and get the result in JSON.
a lot more below are the Restful controls.
Rest API Documentation from Azure Databricks
Thank you.