Metadata-Version: 2.1
Name: databricks-sql-connector
Version: 0.9.0
Summary: Databricks SQL Connector for Python
Home-page: https://databricks.com
Author: Databricks
Author-email: feedback@databricks.com
License: http://www.apache.org/licenses/LICENSE-2.0
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Database :: Front-Ends
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: future
Requires-Dist: python-dateutil
Requires-Dist: thrift (>=0.10.0)

# Databricks SQL Connector for Python (Experimental)

## Experimental

This library is currently in an experimental state and is therefore unsupported. This library’s APIs may change at any time without prior notice. Do not use this library in production.

## 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](https://www.python.org/dev/peps/pep-0249/).

## 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)

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](https://docs.databricks.com/dev-tools/python-sql-connector.html).


