AImart Parquet

v0.3.0
io.github.balogvn/aimart-parquet Checked 1 day ago Published 2 days ago

Messy CSV/JSON/Excel/SPSS/Stata/SAS/PDF tables to typed Parquet, CSV, JSON or Excel; query, join.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

convert_to_parquet Convert to Parquet

Convert a messy data file into clean, typed, zstd-compressed Parquet. Use this first for any CSV/TSV, JSON/NDJSON, Excel, SPSS, Stata or SAS file, or a digital PDF with tables. It detects the format, encoding and delimiter; skips title rows; repairs broken JSON; pulls tables out of PDFs (merging tables that continue across pages); infers int/float/bool/date/timestamp columns (including 1.234,56 and $1,234 formats) while keeping IDs with leading zeros as text; normalizes column names to snake_case; keeps SPSS/Stata/SAS variable and value labels; and can validate against an expected_schema. Re…

ParameterTypeDescription
content_base64The file's raw bytes, base64-encoded (standard or URL-safe alphabet, '=' padding optional). Small files only (under ~3 MB).
filenameOriginal filename, e.g. 'survey.sav'. The extension helps format detection.
options
output_formatAlso return the cleaned table in this format, beside the Parquet, for the same price: csv, json (one array of row objects), ndjson or jsonl (one object per line), xlsx (one sheet), or markdown (a tabl…
output_pathWhere to write the .parquet file. Default: next to the input.
pathLocal filesystem path of the input file.
urlPublic http(s) URL of the input file. Preferred for anything over ~3 MB.

inspect_parquet Inspect Parquet schema

Describe a Parquet file from its footer without reading rows: row count, columns, types, null counts, min/max per column, and SPSS/Stata/SAS labels. The cheapest way to understand a dataset before querying it. Input: artifact_id from convert_to_parquet, or a url to a .parquet file. Free in local mode.

ParameterTypeDescription
pathLocal filesystem path of the input file.
urlPublic http(s) URL of the input file. Preferred for anything over ~3 MB.

preview_parquet Preview Parquet rows

Return a slice of rows from a Parquet file (default 20, max 500), optionally only some columns, as JSON rows, a Markdown table, or CSV. Use to eyeball data; use query_parquet to filter or aggregate. Long cells are truncated. Free in local mode.

ParameterTypeDescription
columnsOnly these columns.
formatstringjson rows (default), a Markdown table, or CSV text.
limitintegerRows to return.
offsetintegerRows to skip.
pathLocal filesystem path of the input file.
urlPublic http(s) URL of the input file. Preferred for anything over ~3 MB.

query_parquet Query Parquet with SQL

Run one read-only DuckDB SELECT over a Parquet file, available as table `data`; join more files by passing `tables` ({name: artifact_id}, up to 7 besides data), e.g. a GL against a bank statement. Supports aggregates, window functions, CTEs, DESCRIBE data and SUMMARIZE data. Up to 1000 rows are returned; `truncated` says if more matched. Writes, file access and multiple statements are rejected. Example: SELECT region, sum(units) FROM data GROUP BY 1 ORDER BY 2 DESC. Free in local mode.

ParameterTypeDescription
sql *stringOne DuckDB SELECT statement over table `data`.
formatstringjson rows (default), a Markdown table, or CSV text.
limitintegerMaximum rows to return.
pathLocal filesystem path of the input file.
tablesExtra tables for joins: {name: local path}, up to 7 besides data. The main input is `data`.
urlPublic http(s) URL of the input file. Preferred for anything over ~3 MB.