Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.55 KB

README.md

File metadata and controls

53 lines (37 loc) · 1.55 KB

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