Send entire columns at once
The log API is designed to extract data from your running code as it's being generated. It is, by nature, row-oriented.
If you already have data stored in something more column-oriented, it can be both a lot easier and more efficient to send it to Rerun in that form directly.
This is what the send_columns API is for: it lets you efficiently update the state of an entity over time, sending data for multiple index and component columns in a single operation.
⚠️
send_columnsAPI bypasses the time context and micro-batcher ⚠️In contrast to the
logAPI,send_columnsdoes NOT add any other timelines to the data. Neither the built-in timelineslog_timeandlog_tick, nor any user timelines. Only the timelines explicitly included in the call tosend_columnswill be included.
To learn more about the concepts behind the columnar APIs, and the Rerun data model in general, refer to this page.
Reference
Examples
Updating a scalar over time, in a single operation
Consider this snippet, using the row-oriented log API:
snippet: archetypes/scalars_row_updates
which can be translated to the column-oriented send_columns API as such:
snippet: archetypes/scalars_column_updates
Updating a point cloud over time, in a single operation
Consider this snippet, using the row-oriented log API:
snippet: archetypes/points3d_row_updates
which can be translated to the column-oriented send_columns API as such:
snippet: archetypes/points3d_column_updates
Each row in the component column can be a batch of data, e.g. a batch of positions. This lets you log the evolution of a point cloud over time efficiently.
Updating a fixed number of arrows over time, in a single operation
Consider this snippet, using the row-oriented log API:
snippet: archetypes/arrows3d_row_updates
which can be translated to the column-oriented send_columns API as such:
snippet: archetypes/arrows3d_column_updates
Each row in the component column can be a batch of data, e.g. a batch of positions. This lets you log the evolution of a set of arrows over time efficiently.
Updating a transform over time, in a single operation
Consider this snippet, using the row-oriented log API:
snippet: archetypes/transform3d_row_updates
which can be translated to the column-oriented send_columns API as such:
snippet: archetypes/transform3d_column_updates
Updating an image over time, in a single operation
Consider this snippet, using the row-oriented log API:
snippet: archetypes/image_row_updates
which can be translated to the column-oriented send_columns API as such:
snippet: archetypes/image_column_updates
Updating custom user-defined values over time, in a single operation
User-defined data can also benefit from the column-oriented APIs.
Consider this snippet, using the row-oriented log API:
snippet: howto/any_values_row_updates
which can be translated to the column-oriented send_columns API as such:
snippet: howto/any_values_column_updates