Sieve documentation
Sieve turns messy tabular data into the table you wanted, using a pipeline of small steps that you can read. It runs entirely in your browser. Nothing you paste leaves the page.
Quick start
- Paste CSV or a JSON array, or open a file. Column types are detected automatically.
- Add steps. Each step takes the table from the step above it.
- Export the result as CSV or JSON.
Steps
| Step | What it does | Fields |
|---|---|---|
Filter | Keeps rows where an expression is true. | expression |
Derive | Adds or replaces a column from an expression. | name, expression |
Select | Keeps the listed columns, in that order. | comma-separated names |
Rename | Renames one column. | from, to |
Sort | Sorts by one column. | column, direction |
Group | One row per group, with an aggregate of a value column. | by, sum / avg / min / max / count, value |
Dedupe | Removes repeats of the listed columns, keeping the first. | comma-separated names |
Expression language
Expressions are parsed by a small hand-written parser and are never passed to eval. Refer to a column by its name, or wrap it in backticks if it contains a space.
delay_min > 10 && route == "Island Line"
round(delay_min / 60, 1)
upper(left(port, 3)) + "-" + vessel
`scheduled time` != ""
| Group | Available |
|---|---|
| Arithmetic | + - * / % |
| Comparison | == != > >= < <= |
| Logic | && || ! |
| Text | lower upper trim left right len contains |
| Numbers | round floor ceil abs min max |
| Empty values | isblank(x), coalesce(a, b) |
How types are detected
A column counts as a number when at least nine in ten non-empty values parse as one. Commas in thousands are accepted. Empty cells stay empty, and arithmetic with an empty value gives an empty value rather than an error.
Errors
If a step cannot run, it is marked in red with the reason, and the preview shows the table from the step before it. Nothing is lost.
| Message | Meaning |
|---|---|
| Unknown column | An expression names a column that does not exist at that point in the pipeline. |
| Unexpected character | The expression could not be parsed. Column names with spaces need backticks. |
Limits
Sieve is built for files up to a few tens of thousands of rows. The preview shows the first 500 rows, and exports always contain everything.