Input change events
How the Input change events table detects discrete input changes and how to query it.
The Input change events transformation records every time a device's discrete input changes state and that change matches a configured input_change rule. Each row in processed_common_data.input_change_events represents one matched change: which input flipped, its new value, when and where it happened, and which rule it satisfied.
Like Rule-based driver events, Input change events runs on a fixed schedule rather than continuously. A refresh function re-evaluates a window of raw data every 15 minutes, so a new row can lag up to 15 minutes behind the actual input change on the device.
Output table: processed_common_data.input_change_events
Each row represents one detected input change that matched an input_change rule. The table is keyed on device_id, device_time, and rule_id.
device_id
integer
Device identifier.
object_id
integer
Object (vehicle/asset) identifier associated with the device.
object_label
text
Human-readable object name. Already denormalized into this table, so unlike Trips, no join to raw_business_data.objects is needed to display it.
device_time
timestamp
Moment the input change occurred on the device.
rule_id
integer
Identifier of the input_change rule that matched.
input_number
integer
Input number, 1-based, matching the position in the discrete_inputs bit string in raw_telematics_data.additional_data.
input_value
integer
New value of the input after the change: 0 or 1.
event_type
text
Always input_change.
event_comment1
text
First comment configured on the matched rule.
event_comment2
text
Second comment configured on the matched rule.
zone_id
integer
Identifier of the geofence zone the device was in when the change occurred. Null if the rule isn't zone-linked.
zone_label
text
Name of that zone. Null if the rule isn't zone-linked.
latitude
numeric
Latitude at the moment of the change, in degrees.
longitude
numeric
Longitude at the moment of the change, in degrees.
created_at
timestamp
When the row was written by the scheduled refresh.
The examples below show common query patterns. The basic query returns recent input changes ordered by device and time. The second filters to a specific input number and value. The third filters to a specific rule.
How input changes are detected
A row in this table isn't written the instant an input changes on the device. It is written on the next scheduled refresh, which re-evaluates a window of raw data against each device's last known state.
Matching against rules
A flipped bit becomes a candidate event if its input number and new value match the condition configured on an input_change rule. See Input triggering for how these rules are configured, and the Rule types reference for the full list of rule types.
Customizing
Input change events isn't customized through a Transformation Builder workflow the way Trips is. The rows that appear here directly reflect whichever input_change rules are configured on your account: to change what gets recorded, add, edit, or remove the corresponding rules rather than a transformation template. See Input triggering for how to configure these rules.
Next steps
Common transformations: Back to the transformation index.
Trips: A sibling transformation that also runs on a schedule against raw telematics data.
Rule-based driver events: A sibling transformation that records driving violations on the same 15-minute schedule.
Raw data layer: Explore
additional_data, the source table that feeds Input change events.Input triggering: Configure the
input_changerules that determine which input changes are recorded here.
Last updated
Was this helpful?