Skip to content

Readme updates #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 24, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
# Databricks SQL Connector for Python

**Status: Generally Available**
The Databricks SQL Connector for Python allows you to develop Python applications that connect to Databricks clusters and SQL warehouses. It is a Thrift-based client with no dependencies on ODBC or JDBC. And it conforms to the [Python DB API 2.0 specification](https://www.python.org/dev/peps/pep-0249/).

Documentation can be found here: [Databricks SQL Connector for Python](https://docs.databricks.com/dev-tools/python-sql-connector.html).
The initial public release (`v1.0`) was a very lightly modified version of [PyHive](https://pypi.org/project/PyHive/). The `v2.0` release was a complete from scratch re-write, with the same public API. Since `v2.0`, it uses Arrow as the data-exchange format. `v2.0` also supports APIs to directly fetch Arrow tables. Arrow tables are wrapped in the `ArrowQueue` class to provide a natural API to get several rows at a time.
Copy link
Collaborator

@moderakh moderakh Jun 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The v2.0 release was a complete from scratch re-write, with the same public API.

can a customer who is using v1. just bump the version of dependency and use v1 in their code without making any code change other than version bump?

are there any breaking changes from v1 -> v2?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, yes. However, after conferring with @taotao-db I removed the reference to the v1 connector. I included it originally because I was confused. I thought the v1 code was contained in the commit history here. But it's actually housed elsewhere and will not be open sourced AFAIK. So best not to reference it here to avoid confusion.


## About
You are welcome to file an issue here for general use cases. You can also contact Databricks Support [here](help.databricks.com).

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/).
# Documentation

For the latest documentation, see

- [Databricks](https://docs.databricks.com/dev-tools/python-sql-connector.html)
- [Azure Databricks](https://docs.microsoft.com/en-us/azure/databricks/dev-tools/python-sql-connector)

## Quickstart

Install the library with `pip install databricks-sql-connector`

Example usage:

```
```python
from databricks import sql

connection = sql.connect(
Expand All @@ -40,5 +43,3 @@ Where:
- `<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).