oxidecomputer / omicron

Omicron: Oxide control plane
Mozilla Public License 2.0
252 stars 40 forks source link

OxQL could expose a way to return only the fields satisfying a query #7131

Open bnaecker opened 21 hours ago

bnaecker commented 21 hours ago

All OxQL queries start with the get table operation. That operates on all the timeseries in a single table, and returns both the data points and fields that match. If there are no matching data points, the entire timeseries is usually filtered out. This is what we want most of the time, but not always. It would be really nice to have a table operation that selected only the fields that match a particular query. For example, if you want to know what sled serial numbers are available to you for the sled_data_link:bytes_sent timeseries, you need to do something like get sled_data_link:bytes_sent | last 1 to get as small a set of data as possible, and then ignore the data points themselves. We could first-class this concept, into something like a get_fields table operation; a modifier on the existing get table operation; or something different.