Databricks SQL Connector for Python
Project description
Databricks SQL Connector for Python
Status: Public Preview
This library is currently shared as Public Preview. Documentation can be found here: Databricks SQL Connector for Python .
About
The Databricks SQL Connector is a Python library that allows you to use Python code to run SQL commands on Databricks clusters and Databricks SQL endpoints. This library follows PEP 249 -- Python Database API Specification v2.0.
Quickstart
Install the library with pip install databricks-sql-connector
Example usage:
from databricks import sql
connection = sql.connect(
server_hostname='<server-hostname>',
http_path='<http-path>',
access_token='<personal-access-token>')
cursor = connection.cursor()
cursor.execute('SELECT * FROM RANGE(10)')
result = cursor.fetchall()
for row in result:
print(row)
cursor.close()
connection.close()
Where:
<server-hostname>is the Databricks instance host name.<http-path>is the HTTP Path either to a Databricks SQL endpoint (e.g. /sql/1.0/endpoints/1234567890abcdef), or to a Databricks Runtime interactive cluster (e.g. /sql/protocolv1/o/1234567890123456/1234-123456-slid123)<personal-access-token>is a HTTP Bearer access token, e.g. a Databricks Personal Access Token.
For more information, see Databricks documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file databricks-sql-connector-0.9.4.tar.gz.
File metadata
- Download URL: databricks-sql-connector-0.9.4.tar.gz
- Upload date:
- Size: 36.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.6.3 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7623681f60f0966b89c04cd1afe5fae7f41abd095f5a5cf3e9c6fd38b21d6db3
|
|
| MD5 |
b6c5bea5eee61e4f51e9ea26409ef56c
|
|
| BLAKE2b-256 |
aea3382a05d409adee2e35de92c7279aecfb8c5ca8d92145d6b482d06bd93b40
|
File details
Details for the file databricks_sql_connector-0.9.4-py3-none-any.whl.
File metadata
- Download URL: databricks_sql_connector-0.9.4-py3-none-any.whl
- Upload date:
- Size: 40.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.6.3 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee0763658614ff7e4dbecb304c4966e876c352f37181df85b02730df2bbaa34d
|
|
| MD5 |
d9abecc6324195e0f13dfc3c0a072da5
|
|
| BLAKE2b-256 |
a8d19093ce024d44cfe5017deb44fa2e252edb708e9847dfaa8146e23a383daf
|