Skip to main content

🗜️Compressing Parquet files using functions

Project description

virtual

🗜️Compressing Parquet files using functions.

virtual is a lightweight framework that transparently compresses Parquet files by using functions between columns, all while giving you the same familiar interface you are used to. How virtual works is magic, and is described in our recent research papers (see below).

🛠 Build

pip install virtual-parquet

or

git clone https://github.com/utndatasystems/virtual.git && cd virtual
pip install .

🔗 Examples

A demo can be found at examples/demo-parquet.ipynb.

🗜️ Compress

Simply compress a Pandas DataFrame with virtual.to_format(df):

import pandas as pd
import virtual

df = pd.read_csv('file.csv')

...

virtual.to_format(df, 'file_virtual.parquet')

% Virtualization finished: Check out 'file_virtual.parquet'.

🥢 Read

Reading in a virtual compress parquet file with virtual.from_format([path]):

import virtual

df = virtual.from_format('file_virtual.parquet')

📊 Query

Or directly run SQL queries on the virtualized Parquet file via duckdb with virtual.query([SQL]):

import virtual

virtual.query(
  'select avg(price) from read_parquet("file_virtual.parquet") where year >= 2024',
  engine = 'duckdb'
)

Expert-User Features

🔍 Inspect the Functions Found

import pandas as pd
import virtual

df = pd.read_csv('file.csv')

functions = virtual.train(df)

% Functions saved under functions.json.

📚 Citation

Please do cite our (very) cool work if you use virtual in your work.

@inproceedings{virtual_trl,
  title = {{Lightweight Correlation-Aware Table Compression}},
  author = {Mihail Stoian and Alexander van Renen and Jan Kobiolka and Ping-Lin Kuo and Josif Grabocka and Andreas Kipf},
  booktitle = {NeurIPS 2024 Third Table Representation Learning Workshop},
  year = {2024},
  url = {https://openreview.net/forum?id=z7eIn3aShi}
}

@inproceedings{virtual_edbt,
  author = {Mihail Stoian and Alexander van Renen and Jan Kobiolka and Ping{-}Lin Kuo and Andreas Zimmerer and Josif Grabocka and Andreas Kipf},
  editor = {Alkis Simitsis and Bettina Kemme and Anna Queralt and Oscar Romero and Petar Jovanovic},
  title = {Virtual: Compressing Data Lake Files},
  booktitle = {Proceedings 28th International Conference on Extending Database Technology, {EDBT} 2025, Barcelona, Spain, March 25-28, 2025},
  pages = {1066--1069},
  publisher = {OpenProceedings.org},
  year = {2025},
  url = {https://doi.org/10.48786/edbt.2025.90},
  doi = {10.48786/EDBT.2025.90},
  timestamp = {Mon, 10 Mar 2025 16:32:47 +0100},
  biburl = {https://dblp.org/rec/conf/edbt/StoianRKKZGK25.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}

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

virtual_parquet-0.2.1.tar.gz (42.9 kB view details)

Uploaded Source

Built Distribution

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

virtual_parquet-0.2.1-py3-none-any.whl (46.5 kB view details)

Uploaded Python 3

File details

Details for the file virtual_parquet-0.2.1.tar.gz.

File metadata

  • Download URL: virtual_parquet-0.2.1.tar.gz
  • Upload date:
  • Size: 42.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for virtual_parquet-0.2.1.tar.gz
Algorithm Hash digest
SHA256 f49fa8cbd7197f1b0dcfebec51d4745614e9538360114e5372b6a084022b3c72
MD5 55c3409874ff1c234f8841e1f0022b0d
BLAKE2b-256 07b7ca86aca81e0ca3ea635bd233243b81bb979388cb3d95ddf56b1e4a4a84fa

See more details on using hashes here.

File details

Details for the file virtual_parquet-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for virtual_parquet-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 48d8d1443d016c270e1e561b70d8edce030a33f8a547ecaec1a791a2862c8412
MD5 1b9ff8920fc9b7dbab90f5b0ba3a9f2b
BLAKE2b-256 e3f3a72595aca1f66dc5b8307328f001c7289eefda3bebe2c59c33bc678bd2c8

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