name: op-filter-true
description: Keep records where the field is logically true. Strict packed_bool by default; opt into JS truthiness.
kind: operator
category: FILTER
operator: FILTER_TRUE
type: reference
applies_to: process, compose, predict
examples_tags: [cohort-analysis, streaming-friendly]
Use when
Keeps only the rows where a yes/no field is yes, such as active accounts or completed surveys.
Questions it answers:
- What do only the completed interviews say?
- What are the figures for active subscribers?
Use something else:
FILTER_FALSEwhen you want the rows where the field is no.FILTER_EXPRESSIONwhen the condition involves more than one field.
Params
Wire: values is a top-level filterer key (beside field), not under params.
| Name | Type | Default | Description |
|---|---|---|---|
values | array | empty (strict) | Omit, or ["strict"], requires packed_bool and matches raw 1. ["truthy"] enables JavaScript-style coercion across any scalar field type (a vec_f32 / vec_f64 field is refused, PULSE_VECTOR_FIELD_NOT_SCALAR). Other values → PROCESSING_CONFIG. |
Inputs
field— strict mode:packed_boolonly. Truthy mode: any scalar field type.
Output
Row-level predicate. Pass when value is true / truthy. No emitted column.
Contract
- Types (
field):packed_bool; any other scalar type isPULSE_FIELD_TYPE_UNSUPPORTED. - Weight: not read; a weight in force is skipped.
- Streaming: streamable; components
mergeable. - Components:
n_in,n_out,n_null_input.
Gotchas
- Strict mode on non-
packed_bool→PULSE_FIELD_TYPE_UNSUPPORTEDwith the suggestedvalues: ["truthy"]fix. - Truthy mode coerces:
0,NaN,"",null→ falsy; everything else → truthy. Null rows DROP in both directions. decimal128truthiness usesSign() != 0.
See
pulse_examples_search tags=[cohort-analysis]- Skills:
aggregation-design,response-components,op-filter-false