base

The base collection is Spade's core block collection. It provides the primitives every pipeline is likely to need: tabular data transformations, map blocks for fan-out, reduce blocks for fan-in, and format conversion utilities.

The collection is implemented in Rust and ships as a single binary with one subcommand per block. Tabular blocks use Polars and accept either CSV or Parquet input — Parquet is the preferred internal format because it is columnar, typed, and self-describing.

Tabular blocks🔗

These blocks operate on tables (CSV or Parquet files) and produce Parquet output by default.

BlockKindDescription
base.filter_rowsstandardFilter rows by a SQL WHERE-style predicate
base.select_columnsstandardKeep or drop a subset of columns
base.aggregatestandardCompute aggregations over a table, optionally grouped
base.group_bystandardGroup by columns and aggregate (convenience wrapper)
base.csv_to_parquetstandardConvert a CSV file to Parquet
base.parquet_to_csvstandardConvert a Parquet file to CSV

Map blocks🔗

Map blocks enumerate items and emit an expansion manifest that fans downstream blocks out in parallel.

BlockKindDescription
base.map_filesmapFan out over every file in a collection
base.map_listmapFan out over a literal list of scalar values
base.map_rangemapFan out over a numeric range

Reduce blocks🔗

Reduce blocks collect mapped outputs back into a single result.

BlockKindDescription
base.reduce_collectionreduceGather mapped outputs back into a collection
base.reduce_stackreduceConcatenate tables row-wise (rbind / UNION ALL)
base.reduce_joinreduceJoin tables on key columns (SQL JOIN)

Installation🔗

spade install file:///path/to/blocks/base