Elements runtime reference / Live streaming

replaceRows

Replace the current live command-stream datasource rows.

Signatuur

replaceRows(rows=None, **kwargs)

Doel

Replace the current live command-stream datasource rows.

Aliases and imports

  • replace_rows

Payloadformaat

Use these fields as the Python call arguments or keyword payload for this helper.

{
  "rows": [
    {
      "step": 2,
      "status": "done"
    }
  ]
}
FieldDescription
rowsList of row dicts, or kwargs['rows'].
kwargsOptional command metadata merged into the event payload.

Return payload

{
  "event": "command",
  "op": "replace",
  "rows": [
    {
      "step": 2,
      "status": "done"
    }
  ]
}

Voorbeeld

def run():
    replaceRows([{"step": 1, "status": "starting"}])
    replaceRows([{"step": 1, "status": "done"}])
    return {"ok": True}

Scope-notities