ROWTIME is a ksqlDB system column attached automatically to every row. It holds the timestamp of the underlying Kafka record, so no timestamp field needs to exist in the event value. section 11.2 section 11.3
The timestamp is set by either the producer or the broker, depending on configuration. ROWTIME differs from an event-time column declared in a stream: an event field can be mapped with the WITH clause, while ROWTIME is already available as record metadata. section 11.2 section 11.3
Use ROWTIME when query logic depends on record metadata rather than payload fields:
- Filter a push query to events in a given time frame, even when records do not define a timestamp column. section 11.3
- Combine it with ROWPARTITION and ROWOFFSET when inspecting the timestamp, partition, and logical position of incoming Kafka records. section 11.3
Filtering events without a payload timestamp
A stream or table can be queried using ROWTIME in a WHERE condition to return only records from the time window of interest. This refines the client-visible results without requiring a timestamp field in each event. section 11.3
