Skip to main content

No project description provided

Project description

Deltalake2DB

This is a simple project that uses Metadata from deltalake package to provide methods to read Delta Lake Tables to either Polars or DuckDB with better Protocol Support as the main deltalake package.

Use with Duckdb

Install deltalake2db and duckdb using pip/poetry/whatever you use.

Then you can do like this:

from deltalake2db import get_sql_for_delta,

with duckdb.connect() as con:
    dt = DeltaTable("tests/data/faker2")
    sql = get_sql_for_delta(dt, duck_con=con) # get select statement
    print(sql)
    duckdb_create_view_for_delta(con, dt, "delta_table") # or let it create a view for you. will point to the data at this point in time

    con.execute("select * from delta_table").fetch_all()

If you'd like to manipulate you can use get_sql_for_delta_expr which returns a SqlGlot Object

Use with Polars

Install deltalake2db and polars using pip/poetry/whatever you use.

dt = DeltaTable("tests/data/faker2")
from deltalake2db import polars_scan_delta
lazy_df = polars_scan_delta(dt)
df = lazy_df.collect()

Protocol Support

  • Column Mapping
  • Almost Data Types, including Structs/Lists, Map yet to be done
  • Test data types, including datetime
  • Deletion Vectors

In case there is an unsupported DeltaLake Feature, this will just throw DeltaProtocolError as does delta-rs

Cloud Support

For now, only az:// Url's for Azure are tested and supported in DuckDB. For polars it's a lot easier, since polars just uses object_store create, so it should just work.

Looking for something different? :)

We also have the following projects around deltalake:

Or projects from other people:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deltalake2db-0.3.3.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deltalake2db-0.3.3-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file deltalake2db-0.3.3.tar.gz.

File metadata

  • Download URL: deltalake2db-0.3.3.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for deltalake2db-0.3.3.tar.gz
Algorithm Hash digest
SHA256 44f030dddf054a0477ebae6c92c5f8596a71eb7ceacc20aed4096c64bb720eec
MD5 edebea5bdee87e5d791d1e7f4a29337e
BLAKE2b-256 2e946280983c5bed2f2bacd3ce93e4b213e930cd6783bf7f26976b183597b28c

See more details on using hashes here.

File details

Details for the file deltalake2db-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: deltalake2db-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for deltalake2db-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 73131738c78877f8b54080c1a7eab409fc43d84f9c4f53e5ba119355c23d55d8
MD5 3f3875a186aa2c86f07a3be972da8a47
BLAKE2b-256 a6153f966733454390f5cb537e39ba4da56ec175196d5985a6b17334f3d4edfa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page