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)
    con.execute("create view delta_table as " + sql)

    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

This does not do a Delta Lake Feature check yet, which is problematic for Deletion Vectors which are not supported yet.

Looking for something different? :)

We also have the following projects around deltalake:

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.1.2.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

deltalake2db-0.1.2-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for deltalake2db-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6dffc8969d1d1d09872f66a72486b194462d625831f64051aec27e8e2565b019
MD5 292bcabb5227164a7b82796caf83df98
BLAKE2b-256 95ceb57a295ce76eddec882cb1607b08ec706e2e866a33db52f9ee1225989b4e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for deltalake2db-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 61316c9f61bc0e736d73950a9aaeec0c40d45bbb9c561bf44f846b739323ab31
MD5 37c7de928e72cb1e0847649beb2db43f
BLAKE2b-256 8b54d156b3b03dacc55b6b88e36d34973d7608f6ce8fe63dd3d9146b2a69fc4b

See more details on using hashes here.

Supported by

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