rerun-parquet
它能做什么
该技能说明如何通过配置而不是自定义代码,把 Parquet 表格映射到 Rerun 数据模型上。适用于拥有存储在 Parquet 文件中的表格式机器人或传感器数据的人。
适用场景
- ✓当你有一个包含机器人轨迹或传感器读数的 Parquet 文件,想加载到 Rerun 中时。
- ✓当你需要决定哪些列成为时间线、实体或分组组件时。
- ✓当有人建议先用 pandas 重塑 Parquet 文件,而你希望走更简单的路径时。
技能链接
https://github.com/rerun-io/rerun/blob/main/skills/rerun-parquet/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我有一个包含随时间变化的关节位置的 Parquet 文件。如何用正确的时间线把它加载到 Rerun 中?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会设置一个读取器,按列名前缀对列进行分组,并把时间列标记为时间线。然后,它添加 lens,把分组后的数值转换为带类型的 Rerun 组件。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Rerun parquet ingestion
ParquetReader is a pure reader: it maps a flat table onto the Rerun
model by turning raw columns into grouped, time-indexed chunks of struct and
scalar components. Column-name prefixes become entities, grouped columns
become a single struct component, designated columns become timelines. The
reader does not assemble archetypes anymore — mapping struct fields into
typed Rerun components (Transform3D, Scalars, Points3D) is done with lenses on
the reader's .stream(). The whole reader job is configuration; fill in the
rerun-data-model mapping table first, then express it through stream().
Stream mechanics after .stream() are in rerun-chunk-processing.
The whole table is configuration, not code. If you find yourself building
Chunk.from_columns from a parquet, or munging it in pandas first, stop —
ParquetReader plus a lens almost certainly expresses it. Anything the reader
cannot express (per-row entity routing, derived values, unit conversion)
belongs in lenses downstream, not in pre-pandas munging; keep the pipeline
columnar.
The API
from rerun.chunk import DeriveLens, IndexColumn
from rerun.experimental import ParquetReader
reader = ParquetReader(table_path) # a lightweight handle over the file
stream = reader.stream(
entity_path_prefix="/world", # prepended to every entity path
column_grouping="prefix", # "prefix" | "individual" | "explicit_prefixes"
delimiter="_", # split for column_grouping="prefix"
prefixes=None, # required for "explicit_prefixes"
use_structs=True, # pack grouped columns into one struct component
static_columns=["robot_type"], # constant-per-file values, logged static
index_columns=[IndexColumn.timestamp("timestamp", input_unit="us"), IndexColumn.sequence("frame_index")],
)
The constructor takes only path; all loading options live on stream(), and every one is keyword-only.
Each stream() call is independent, so one reader can drive several differently-configured streams over the same file.
The config is validated against the file's schema at stream() (missing index/static columns raise ValueError there, not mid-iteration).
There is no column_rules kwarg — typed-component assembly moved to lenses (below).
What the reader emits
The reader turns the table into chunks, one chunk per group, then leaves the data as generic struct/scalar components for lenses to map. The naming is the key thing the rest of the pipeline keys off:
A grouped multi-column prefix
X→ entity/X, with a single struct component nameddata. The struct's fields are the column names with the prefix (and delimiter, for"prefix") stripped. SoA_pos_x,A_quat_wunder prefixAland as structdatawith fieldspos_x,quat_won entity/A.A lone column with no group → its own entity named after the column, and a raw component named after the column — not a
datastruct. So aspeedcolumn becomes entity/speed, componentspeed.A
/__propertiesmetadata chunk built from the parquet file's schema metadata. You typically drop it right after.stream():stream = reader.stream().drop(content="/__properties/**")
Column grouping: which columns share an entity
"prefix"(default): split each column name ondelimiter, group by the first segment.gripper_pos_x,gripper_pos_y→ entity/gripper, structdata{pos_x, pos_y}."explicit_prefixes": group by the exact strings inprefixes, tried longest-first; the prefix is stripped from each struct field name (a raw string match, no delimiter —foo+a→ fielda). Columns matching no prefix become individual groups. Use this when names contain the delimiter ambiguously (observation.statevsobservation.images.top: pass the full prefixes)."individual": every column is its own chunk/entity with a raw component named after the column — no struct packing at all, even for columns sharing a prefix.use_structsis ignored here. Rarely the model you want; reach for it only as a debugging baseline.
use_structs=True (default) packs a group's columns into a single Arrow
struct component (the data field) for "prefix"/"explicit_prefixes";
False emits one component per column (the pre-struct flat layout, what
queries see as separate columns).
Timelines: index_columns
Each entry is built with IndexColumn: `IndexColumn.timestamp(
常见问题
哪一列应该作为时间线?
该技能要求你把时间列或索引列标记为时间线,这样在查看录制时,所有数据都会与之对齐。
我需要编写 Python 代码吗?
该技能把映射视为配置。只有读取器无法表达的步骤才需要代码,这些步骤通过 lens 处理。
什么是 lens?
lens 是一个小规则,可把原始的分组列转换为带类型的 Rerun 组件,例如变换或一组标量值。
详情
作者的原始描述
Ingest tabular Parquet files into Rerun chunk streams with rerun.experimental.ParquetReader. Read when converting trajectory or sensor tables (LeRobot-style parquet, exported logs) into entities and components — column grouping, timeline/index columns, static columns, and lenses (DeriveLens) that assemble the typed components (Transform3D, Scalars) from the reader's grouped struct/scalar output. Builds on rerun-chunk-processing and rerun-data-model.
repo: rerun-io/rerun
热度
- GitHub 星标
- 12k
- 排名
- #11557
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
investigate-puffin
12k帮你的智能体分析 Puffin 性能分析录制文件(.puffin 文件),找出耗时较长的代码段,并比较变更前后的跟踪记录。
rerun-blueprint
12k教你的智能体通过为录制或表格编写蓝图,改变 Rerun 查看器的外观,包括布局、视图和隐藏的列。
rerun-catalog-queries
12k帮你的智能体从 Python 更快地查询 Rerun 目录,并附有关于往返次数、载荷大小和数据集读取缓慢的提示。
rerun-chunk-processing
12k教你的智能体使用读取器和 lens 构建 Rerun 数据流水线,将 MCAP、Parquet、视频或 RRD 文件转换为录制。