Table
Type:
table
• Category:visualization
Description
Store table rows
Parameters
Name | Type | Description | Required | Default |
---|---|---|---|---|
widgetId | string | no | ||
rowsExpr | string | Expr -> list[dict] | no | |
columns | array | Optional list of columns | no | |
limit | number | no | 200 |
Help
Overview
The Store Table Rows worker is designed to collect and retain rows of tabular data that represent financial‑market information. By evaluating an expression that yields a list of dictionaries, the worker can persist the resulting rows for downstream display components such as charts, tables, or dashboards. It is a lightweight utility that focuses solely on storing the data; any further processing or visualization must be handled by other workers or UI elements.
Inputs
widgetId
(string) – A unique identifier for the widget or component that will later retrieve the stored rows. This ID is used as the key under which the data is saved.rowsExpr
(string) – An expression written in the platform’s expression language. When evaluated, it must return a list of dictionaries, where each dictionary corresponds to a single table row (e.g.,{ "symbol": "AAPL", "price": 172.45 }
).columns
(array, optional) – An explicit list of column names to be retained from each row. If omitted, all keys present in the dictionaries produced byrowsExpr
are kept. Supplying this list can help enforce a consistent column order or discard unnecessary fields.limit
(number, default = 200) – The maximum number of rows that will be stored. If the evaluated list exceeds this limit, only the first limit rows are saved, preventing excessive memory usage.
Minimal Example
Assume you have a widget that displays the latest prices for a set of stocks. The following configuration stores up to 100 rows of price data under the widget ID stockTable
:
- widgetId:
stockTable
- rowsExpr:
fetch_market_data("NASDAQ")
(returns a list of dictionaries, each containingsymbol
,price
,volume
, etc.) - columns:
["symbol", "price", "volume"]
- limit:
100
When the worker runs, it evaluates fetch_market_data("NASDAQ")
, trims the result to the first 100 entries, extracts only the symbol
, price
, and volume
fields, and stores the resulting rows keyed by stockTable
. Subsequent components can retrieve this data using the same widgetId
.