Skip to main content

databricks-external-access

CI

Browse a Databricks workspace (Unity Catalog) and fetch tables to your own machine as Parquet, with no Databricks compute and no secrets. Sign in once through your workspace's SSO.

import databricks_external_access as dbx

dbx.login("https://dbc-1234abcd-5678.cloud.databricks.com")  # once per machine

dbx.overview()  # everything you can see, as a tree
dbx.describe("main.sales.orders")  # columns and descriptions

path = dbx.fetch(
    "main.sales.orders",
    columns=["order_date", "customer", "total"],
    where="customer = 'ACME'",
    limit=1_000_000,
)
# stderr: main.sales.orders: 2 Parquet files, 51.5 MiB on storage ...

import polars as pl  # or pandas, DuckDB, Spark, ...

df = pl.read_parquet(path)

New here? Open the tutorial notebook (uv run --group notebook jupyter lab).

Status: alpha (0.x). The API may change between minor versions; see the changelog. It is installed from git tags for now; publishing to PyPI is planned.

Setup

  1. Install a pinned release (see the repository's Releases page for the latest tag):

    uv add "databricks-external-access @ git+https://github.com/Northbridge-Capital/databricks-external-access@v0.1.0"
    # or: pip install "databricks-external-access @ git+https://github.com/Northbridge-Capital/databricks-external-access@v0.1.0"
    
  2. Run dbx.login("https://<your-workspace>.cloud.databricks.com") once. A browser opens to sign in through your workspace's SSO; the workspace is remembered and the token is cached and refreshed automatically. Scripts and CI can set DATABRICKS_HOST instead, which overrides the saved workspace.

Requires Python 3.11+, an AWS workspace and internet access (DuckDB downloads two extensions on first use). To fetch a table you need SELECT on it and EXTERNAL USE SCHEMA on its schema; this package never manages grants, so ask your Databricks admin. The full list of requirements and constraints is in docs/requirements.md.

API

Function Returns
login("https://...") nothing; saves the workspace and signs in (once per machine)
overview(catalog=None) nothing; prints catalogs, schemas and tables as a tree (skips system, samples and information_schema unless you name the catalog)
catalogs() list[Entry]: name, comment
schemas("catalog") list[Entry], named catalog.schema
tables("catalog.schema") list[Table]: name, kind, comment, columns (name, type, comment)
describe("catalog.schema.table") one Table
fetch("catalog.schema.table", columns=, where=, limit=, dest="data") Path to <dest>/<name>.parquet

fetch prints the table's size on storage to stderr before reading any data; for a slice this is the whole table, an upper bound. where is a DuckDB SQL predicate that runs on your machine with your own credentials and is not sanitised. A failed fetch leaves no partial file.

Errors

Everything raises a subclass of databricks_external_access.Error, with a message that says what to do:

Error Raised when
NotSignedIn Databricks rejects your sign-in; delete the token cache and retry
AccessDenied you lack SELECT or EXTERNAL USE SCHEMA
UnsupportedTable views, shared (Delta Sharing), foreign and non-Delta tables, non-AWS workspaces, and pipeline tables whose pipeline has not enabled pipelines.externalMetadata.enabled
NotFound the table does not exist, or you cannot see it
Error anything else actionable, such as no workspace configured or an http:// URL

More

  • Requirements: what it must do, the conditions it works under, what is out of scope, and how each is verified.
  • Design: how it works, why DuckDB, trade-offs, and where to extend it.
  • Contributing: setup, checks and the release process.

License

MIT, see LICENSE.

Metadata

Release files for databricks-external-access 0.1.1

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

Source distribution (sdist)

Source distribution for databricks-external-access 0.1.1
File Size Uploaded Provenance Actions
databricks_external_access-0.1.1.tar.gz 189.5 kB With provenance Details for databricks_external_access-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for databricks-external-access 0.1.1
File Interpreter ABI Platform Actions
databricks_external_access-0.1.1-py3-none-any.whl Python 3 none any Details for databricks_external_access-0.1.1-py3-none-any.whl

Total release size: 201.8 kB

Release files / databricks_external_access-0.1.1.tar.gz

Download URL databricks_external_access-0.1.1.tar.gz
Size 189.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0f65d3aaeaf88ef5b1cf275c7ab68e69bd6b71b748274330a1c77f9f6c2672b1
BLAKE2b-256 checksum
How to use checksums
1af69c982f79e0e512620c4c310bd6a106e4383c123d2cc518a8c1f3235ab447
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / databricks_external_access-0.1.1-py3-none-any.whl

Download URL databricks_external_access-0.1.1-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae88d446977a71c52b209dc871dda95c624a72094ea6873b0a325a27f4fb5405
BLAKE2b-256 checksum
How to use checksums
791b5f38e3d92dc97b7a9849b8be813786a0a31ee50d7b07ab0713d31b35caed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Security for databricks-external-access 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for databricks_external_access-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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