Time Window Matcher icon

Time Window Matcher

Enrich records in one stream with a value from the closest matching record in another stream, joined by a time window and optional exact-match fields.

Time Window Matcher

AI-generated

Summary

Enriches each item from the Main input with a value from the closest eligible item on the Lookup input. A lookup item must fall within the configured number of seconds before the main date and satisfy any enabled exact and mapped field matches.

Inputs

  • Main Date Field (required) — Field on each Main item containing a date string. Set Main Date Formats to the Luxon formats to try in order, separated by semicolons, and Main Timezone to the IANA timezone for that date.
  • Lookup Timestamp Field (required) — Field on Lookup items containing an ISO timestamp. The node parses these timestamps as UTC.
  • Lookup Value Field (required) — Field on the selected Lookup item whose value is copied to the Main item.
  • Output Field Name (required) — Name of the field added to each output item for the copied lookup value.
  • Time Window (seconds) — Maximum age of a lookup timestamp before the main date; defaults to 300 seconds. Timestamps after the main date are not eligible.
  • Exact match fields — When Use Exact Match Field? is enabled (default), Main Exact-Match Field and Lookup Exact-Match Field must have equal trimmed string values.
  • Mapped match fields and Value Map (JSON) — When Use Mapped Match Field? is enabled (default), the main field is mapped using the case-sensitive JSON map; unmapped values are lowercased. The result is compared case-insensitively with the lowercased lookup field.
  • Include Match Metadata — Defaults to true. For successful matches, adds match_status, rounded match_time_diff_sec, the selected lookup timestamp, and—if mapped matching is enabled—the lookup mapped field.

Output shape

One output item per Main item, retaining its fields and adding the configured output field.

The closest eligible lookup record is the one with the smallest nonnegative time difference. If no value is found, the output field is an empty string and match_status is no_match; missing or unparseable main dates produce missing_date or invalid_date, respectively. These failure statuses are added even when Include Match Metadata is disabled. Invalid Value Map JSON or an empty list of date formats raises an operation error.

Links

Discussion