This is a collection of handy scripts used in snek-at/functions provided by snek-at.
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 fileretrieve
command: Loads a parquet file and returns the data as a json objectsearch
command: Search the specific column and value in the parquet file and returns the data as a json object
- Python 3
- DuckDB
- Pandas
pip install duckdb pandas
python script.py [command] [path/to/file.parquet] [data.json] [column_name1=value1] [column_name2=value2]
# 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