Updated Sep 21, 2026

Utilities

Transform record-oriented data with Miller

Named verbs for filtering, reshaping, sorting, and converting record streams.

Agent

overview

What miller does

Miller reads record-oriented data and applies a verb such as cat, cut, sort, filter, or stats1. Connect a data file, select its format with -i, choose the output format with -o, and set the verb that should process each record.

The optional -f value supplies a comma-separated field list to verbs that accept it, including cut and sort. Input and output formats can differ, so the same node can select columns from CSV and emit JSON.

The wrapper writes stdout to a temporary file and publishes it only after mlr exits successfully. Unsupported verb options or malformed input fail the node without leaving a partial result.

source github.com/johnkerl/miller

use cases

Where miller fits

Select CSV columns

Run cut with -f to keep only the columns needed downstream.

Convert records to JSON

Read CSV or TSV with -i and emit JSON or JSON Lines with -o.

Sort a dataset

Run the sort verb with a field list before loading the result elsewhere.

reference

miller inputs and flags

5 inputs
NameTypeFlagDescription
inputFILE--inputInput data file.
input-formatSTRING--input-formatInput format such as csv, tsv, json, or jsonl.
output-formatSTRING--output-formatOutput format such as csv, tsv, json, or jsonl.
verbSTRING--verbMiller verb such as cat, cut, sort, filter, or stats1.
fieldsSTRING--fieldsComma-separated field list for supported verbs.

Showing key inputs. miller exposes 5 inputs in total.

example

Run miller

miller · command
# Millermlr -i csv -o json cut -f name,n input.csv
sample output
[{  "name": "alpha",  "n": 2},{  "name": "beta",  "n": 1}]

guidance

Choosing miller

Use Miller when the data is a stream of named records and a built-in verb describes the operation. Use csvkit or DuckDB when SQL is a better fit.

csvkit

Runs SQL against one CSV with csvsql.

duckdb

Queries multiple CSV, JSON, or Parquet files with SQL.

jq

Filters arbitrary JSON structures rather than tabular records.

faq

miller questions

The node exposes CSV, TSV, JSON, JSON Lines, and any other format accepted by mlr's -i option.

Run miller yourself

A two-row CSV feeds Miller cut with name,n and is emitted as a JSON array.

Facts on this page come from the live Trickest tool library.