The primary way to interact with the τ database is through a simple, text-based command protocol. Each command follows a command_name <...args> format.
Here is a complete list of available commands.
Core Primitives
create_schedule
Creates a new, empty schedule with the given name.
- Syntax:
create_schedule <name> name: The unique identifier for the new schedule.
1create_schedule sensor_acreate_frame
Creates a new frame that groups multiple schedules together.
- Syntax:
create_frame <frame_name> <schedule1_name> [<schedule2_name> ...] frame_name: The unique identifier for the new frame.schedule_names: A space-separated list of at least one existing schedule to include in the frame.
1create_schedule sensor_a
2create_schedule sensor_b
3create_frame all_sensors sensor_a sensor_bcreate_lens
Creates a new, reusable Lens for transforming data.
- Syntax:
create_lens <lens_name> '<expression>' lens_name: The unique identifier for the new lens.expression: The mathematical or logical expression for the transformation, enclosed in single quotes.
1# Note: Input variables (e.g., 'temp_c') are added separately
2create_lens to_fahrenheit '(temp_c * 9/5) + 32'append
Appends a new data point (Tau) to a schedule.
- Syntax:
append <schedule_name> <data> <valid_ns> <expiry_ns> schedule_name: The name of the schedule to append to.data: The data value for theTau.valid_ns: The start of theTau's validity period (nanosecond timestamp).expiry_ns: The end of theTau's validity period (nanosecond timestamp).
1# Appends the value 15.5 to 'sensor_a' with a specific validity range
2append sensor_a 15.5 1672531200000000000 1672531201000000000Query Commands
at
Retrieves the exact Tau from a schedule at a specific nanosecond timestamp.
- Syntax:
at <schedule_name> <timestamp_ns> schedule_name: The name of the schedule or lens to query.timestamp_ns: The exact nanosecond timestamp to look up.
1at sensor_a 1672531200500000000range
Retrieves all Taus within a schedule that fall within a given nanosecond time range.
- Syntax:
range <schedule_name> <start_ns> <end_ns> schedule_name: The name of the schedule or lens to query.start_ns: The start of the time range (inclusive).end_ns: The end of the time range (inclusive).
1range sensor_a 1672531200000000000 1672531210000000000valid_at
Retrieves the Tau that is considered "valid" at a specific point in time. This is useful for bitemporal queries where you need to know the value "as of" a certain time.
- Syntax:
valid_at <schedule_name> <timestamp_ns> schedule_name: The name of the schedule or lens to query.timestamp_ns: The nanosecond timestamp to check for validity.
1# What was the value in sensor_a at this exact moment?
2valid_at sensor_a 1672531205000000000valid_after
Retrieves all Taus that are valid at or after a specific point in time.
- Syntax:
valid_after <schedule_name> <timestamp_ns> schedule_name: The name of the schedule or lens to query.timestamp_ns: The nanosecond timestamp to start checking from.
1# Get all values from this point forward
2valid_after sensor_a 1672531200000000000