Skip to main content

sqlalchemy-databricks

pypi pyversions

A SQLAlchemy Dialect for Databricks workspace and sql analytics clusters using the officially supported databricks-sql-connector dbapi.

Installation

Install using pip.

pip install sqlalchemy-databricks

Usage

Installing registers the databricks+connector dialect/driver with SQLAlchemy. Fill in the required information when passing the engine URL. The http path can be for either a workspace or sql analytics cluster.

from sqlalchemy import *
from sqlalchemy.engine import create_engine


engine = create_engine(
    "databricks+connector://token:<databricks_token>@<databricks_host>:443/<database_or_schema_name>",
    connect_args={
        "http_path": "<cluster_http_path>",
    },
)

logs = Table("my_table", MetaData(bind=engine), autoload=True)
print(select([func.count("*")], from_obj=logs).scalar())

Release files for sqlalchemy-databricks 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqlalchemy-databricks 0.2.0
File Size Uploaded
sqlalchemy-databricks-0.2.0.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sqlalchemy-databricks 0.2.0
File Interpreter ABI Platform
sqlalchemy_databricks-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.5 kB

Release files / sqlalchemy-databricks-0.2.0.tar.gz

Download URL sqlalchemy-databricks-0.2.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d6efc02643962a1841eeb9139b942efc0246440c9cef3e7f7ebb3ea8d38eb5c0
BLAKE2b-256 checksum
How to use checksums
354de83a8fb0203b2e8747b247b3e839cfe591caf3855c038009065bbe755b29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.8.2 Darwin/20.1.0

Release files / sqlalchemy_databricks-0.2.0-py3-none-any.whl

Download URL sqlalchemy_databricks-0.2.0-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0c34e85727c289f742c258ce236fe7c95bcc4bcc3a2872b724cc2da20f4db8c
BLAKE2b-256 checksum
How to use checksums
2849bdfb7e9d2a6de4b9fd20a90442a00c9bf4109bbb09e9a5a68c86e98babb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.8.2 Darwin/20.1.0

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page