Filters

Publish safe request-time filters with type-compatible, per-field operator allowlists.

Last verified 2026-08-24

Filters narrow analytics results. ReportPlane separates filters built into a definition from filters a runtime caller is allowed to provide.

Allowed filters

An allowed filter names a field and optionally a per-field operator list. The public caller cannot filter an arbitrary model field just because it exists.

If the operator list is omitted, the runtime still limits the field to globally valid and type-compatible operators.

Operators

OperatorValue shapeCompatible use
equalsScalarExact match
not_equalsScalarExact non-match
containsScalarText or array contains value
not_containsScalarText or array does not contain value
inNon-empty arrayScalar is one of the values
not_inNon-empty arrayScalar is not one of the values
between{ "from": ..., "to": ... }Numeric or time range
gt, gte, lt, lteScalarNumeric or time comparison
existsNo value requiredField presence
contains_anyNon-empty arrayArray has at least one value
contains_allNon-empty arrayArray has every value

Numeric and timestamp fields support exact, set, range, and comparison operators. Booleans support exact and set operators. Strings support exact, contains, and set operators. Arrays use array contains operators. Root object and json values are not directly filterable; use an explicit supported dotted field path.

Runtime example

{
  "field": "occurred_at",
  "operator": "between",
  "value": {
    "from": "2026-08-01T00:00:00Z",
    "to": "2026-08-02T00:00:00Z"
  }
}

Repeated filters

Repeated equals filters for the same field are combined into an in condition. Repeated not_equals filters become not_in. This preserves the intended set behavior without building contradictory equality clauses.

Fixed and access filters

Definitions can carry fixed filters, and query clients can carry access filters. These are policy constraints rather than caller-controlled convenience filters. A public request cannot remove them.

In the console, Analytics create and edit screens expose definition-level fixed filters as Required Filters. The Analytics detail page shows the same rules under Definition → Required Filters, alongside the raw canonical definition. Changing or removing one changes every execution of that Analytics API.

Rolling time policy

A fixed or access filter can express a timestamp relative to the start of each query execution. Core resolves it once to an absolute UTC timestamp before planning, so the same definition works across BigQuery, ClickHouse, Snowflake, Elasticsearch, and OpenSearch.

{
  "field": "observed_at",
  "operator": "gte",
  "value": { "relative_time": "-24h" }
}

The offset uses Go duration syntax such as -30m, -24h, or -168h. Relative values are policy-owned: runtime callers cannot remove or widen a fixed rolling window. Normal Analytics cache TTL still applies after the boundary is resolved.

contains is a substring match, not a prefix-only match. For example, a required url contains /blog rule also matches a value where /blog occurs later in the URL.

Was this page helpful?Send feedback