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
2.9.1
2.9.0
2.8.0
2.7.1.dev3
2.7.1.dev2
2.7.1.dev1
2.7.0
2.6.3.dev1
2.6.2
2.6.1.dev1
2.6.1
2.6.0
2.5.2
2.5.1
2.5.0
2.4.1
2.4.0
2.3.1.dev1
2.3.0
2.2.dev1676479629
2.2.dev1675985183
2.2.dev1669954165
2.2.2
2.2.1
2.2.0
2.1.dev1672379067
2.1.dev1666624638
2.1.0
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0b2
2.0.0b1
2.0.0b0
2.0.0
1.0.2
1.0.1
1.0.0
0.9.4
0.9.3
0.9.2
0.9.1
0.9.0
توضیحات
Databricks SQL Connector for Python
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | databricks-sql-connector-4.2.6 |
| نام | databricks-sql-connector |
| نسخه کتابخانه | 4.2.6 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Databricks |
| ایمیل نویسنده | databricks-sql-connector-maintainers@databricks.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/databricks-sql-connector/ |
| مجوز | Apache-2.0 |
# Databricks SQL Connector for Python
[](https://pypi.org/project/databricks-sql-connector/)
[](https://pepy.tech/project/databricks-sql-connector)
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. It conforms to the [Python DB API 2.0 specification](https://www.python.org/dev/peps/pep-0249/).
This connector uses Arrow as the data-exchange format, and supports APIs (e.g. `fetchmany_arrow`) 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. [PyArrow](https://arrow.apache.org/docs/python/index.html) is required to enable this and use these APIs, you can install it via `pip install pyarrow` or `pip install databricks-sql-connector[pyarrow]`.
The connector includes built-in support for HTTP/HTTPS proxy servers with multiple authentication methods including basic authentication and Kerberos/Negotiate authentication. See `docs/proxy.md` and `examples/proxy_authentication.py` for details.
You are welcome to file an issue here for general use cases. You can also contact Databricks Support [here](help.databricks.com).
## Requirements
Python 3.9 or above is required.
## 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
### Installing the core library
Install using `pip install databricks-sql-connector`
### Installing the core library with PyArrow
Install using `pip install databricks-sql-connector[pyarrow]`
```bash
export DATABRICKS_HOST=********.databricks.com
export DATABRICKS_HTTP_PATH=/sql/1.0/endpoints/****************
```
Example usage:
```python
import os
from databricks import sql
host = os.getenv("DATABRICKS_HOST")
http_path = os.getenv("DATABRICKS_HTTP_PATH")
connection = sql.connect(
server_hostname=host,
http_path=http_path)
cursor = connection.cursor()
cursor.execute('SELECT :param `p`, * FROM RANGE(10)', {"param": "foo"})
result = cursor.fetchall()
for row in result:
print(row)
cursor.close()
connection.close()
```
In the above example:
- `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)
> Note: This example uses [Databricks OAuth U2M](https://docs.databricks.com/en/dev-tools/auth/oauth-u2m.html)
> to authenticate the target Databricks user account and needs to open the browser for authentication. So it
> can only run on the user's machine.
## Transaction Support
The connector supports multi-statement transactions with manual commit/rollback control. Set `connection.autocommit = False` to disable autocommit mode, then use `connection.commit()` and `connection.rollback()` to control transactions.
For detailed documentation, examples, and best practices, see **[TRANSACTIONS.md](TRANSACTIONS.md)**.
## SQLAlchemy
Starting from `databricks-sql-connector` version 4.0.0 SQLAlchemy support has been extracted to a new library `databricks-sqlalchemy`.
- Github repository [databricks-sqlalchemy github](https://github.com/databricks/databricks-sqlalchemy)
- PyPI [databricks-sqlalchemy pypi](https://pypi.org/project/databricks-sqlalchemy/)
### Quick SQLAlchemy guide
Users can now choose between using the SQLAlchemy v1 or SQLAlchemy v2 dialects with the connector core
- Install the latest SQLAlchemy v1 using `pip install databricks-sqlalchemy~=1.0`
- Install SQLAlchemy v2 using `pip install databricks-sqlalchemy`
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md)
## License
[Apache License 2.0](LICENSE)
نیازمندی
| مقدار | نام |
|---|---|
| ython_versio | lz4<5.0.0,>=4.0.2; |
| ython_versio | lz4<5.0.0,>=4.4.5; |
| - | oauthlib<4.0.0,>=3.1.0 |
| - | openpyxl<4.0.0,>=3.0.10 |
| ython_versio | pandas<2.4.0,>=1.2.5; |
| ython_versio | pandas<2.4.0,>=2.2.3; |
| python_versio | pyarrow>=14.0.1; |
| ython_versio | pyarrow>=18.0.0; |
| ython_versio | pyarrow>=22.0.0; |
| - | pybreaker<2.0.0,>=1.0.0 |
| - | pyjwt<3.0.0,>=2.0.0 |
| - | python-dateutil<3.0.0,>=2.8.0 |
| - | requests<3.0.0,>=2.18.1 |
| - | thrift<0.23.0,>=0.22.0 |
| - | urllib3>=1.26 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| <4.0.0,>=3.8.0 | Python |
نحوه نصب
نصب پکیج whl databricks-sql-connector-4.2.6:
pip install databricks-sql-connector-4.2.6.whl
نصب پکیج tar.gz databricks-sql-connector-4.2.6:
pip install databricks-sql-connector-4.2.6.tar.gz