Skip to content
/ pit Public
generated from snek-at/repository-template

Snek Pit allows users to create and manage parquet files using DuckDB and Pandas.

License

Notifications You must be signed in to change notification settings

snek-at/pit

Repository files navigation

SNEK Logo

Snek Toolbox

This is a collection of handy scripts used in snek-at/functions provided by snek-at.

Snek Pit

This application allows users to create and manage parquet files using DuckDB and Pandas. The application has the following functionality:

  • dump command: Takes json data and saves it to a parquet file
  • retrieve command: Loads a parquet file and returns the data as a json object
  • search command: Search the specific column and value in the parquet file and returns the data as a json object

Requirements

  • Python 3
  • DuckDB
  • Pandas

Installation

pip install duckdb pandas

Usage

python script.py [command] [path/to/file.parquet] [data.json] [column_name1=value1] [column_name2=value2]

Example

# Loads a parquet file and returns the data as a json object
python script.py retrieve path/to/file.parquet

# Saves json data to a parquet file
python script.py dump path/to/file.parquet data.json

# Search the specific column and value in the parquet file and returns the data as a json object
python script.py search path/to/file.parquet column_name1=value1 column_name2=value2

SPDX-License-Identifier: (EUPL-1.2) Copyright © 2019-2022 snek.at

About

Snek Pit allows users to create and manage parquet files using DuckDB and Pandas.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published