Skip to main content

Polars IO

Project description

Polars IO utility library

Helpers to make it easier to read and write Hive partitioned parquet dataset with Polars.

It is meant to be a library to deal with datasets easily, but also contains a commandline interface which allows you to inspect parquet files and datasets more easily.

Dataset

Example of use of polario.dataset.HiveDataset

from polario.dataset import HiveDataset
import polars as pl
df = pl.from_dicts(
        [
            {"p1": 1, "v": 1},
            {"p1": 2, "v": 1},
        ]
    )

ds = HiveDataset("file:///tmp/", partition_columns=["p1"])

ds.write(df)

for partition_df in ds.read_partitions():
    print(partition_df)

To model data storage, we use three layers: dataset, partition, fragment.

Each dataset is a lexical ordered set of partitions Each partition is a lexical ordered set of fragments Each fragment is a file on disk with rows in any order

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

polario-0.3.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

polario-0.3.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file polario-0.3.0.tar.gz.

File metadata

  • Download URL: polario-0.3.0.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for polario-0.3.0.tar.gz
Algorithm Hash digest
SHA256 bd117643e05596ba9cbb6de913ba59501953fbfdb0c4c32de044516370d0cd09
MD5 e404c47697a5b24c1b39de8c5b9c4469
BLAKE2b-256 4f35cd2dcb68f6786a2819b8e06a83715f09b3a2948c9f280e151d2a7c1775c1

See more details on using hashes here.

File details

Details for the file polario-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: polario-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for polario-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e2b98808aaa0a076f8061179f459f27de32d2b4c74f2e2b03b117ceff773dc8e
MD5 fffba7791c6c9640b60aa63e22041c09
BLAKE2b-256 f93749e94797ac197b14648a57e23a9d3139f36ca8778aeb1ba8e8a41c4a1310

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