> ## Documentation Index
> Fetch the complete documentation index at: https://docs.textql.com/llms.txt
> Use this file to discover all available pages before exploring further.

# streamTemplateDataStatus

> Per-row playbook template execution status.

```typescript theme={null}
streaming.playbooks.streamTemplateDataStatus(request, options?) → AsyncIterable<TemplateDataStatusUpdate>
```

On connect it replays a snapshot of every row's current status, then streams
transitions.

## Example

```typescript theme={null}
import { createStreamingClient } from "@textql/sdk/streaming";
import { TemplateDataExecutionStatus } from "@textql/sdk/generated/connect/public/playbook_pb.js";

const streaming = createStreamingClient({ apiKey });

for await (const update of streaming.playbooks.streamTemplateDataStatus({
  templateHeaderId,
  playbookId,
})) {
  setRowStatus(update.templateDataId, update.executionStatus);
  if (update.executionStatus === TemplateDataExecutionStatus.FAILED) {
    showRowError(update.templateDataId, update.lastExecutionError);
  }
}
```

## Request

| Field              | Type     |
| ------------------ | -------- |
| `templateHeaderId` | `string` |
| `playbookId`       | `string` |

## Updates

| Field                                                | Type                          | Notes                                                                |
| ---------------------------------------------------- | ----------------------------- | -------------------------------------------------------------------- |
| `templateDataId`                                     | `string`                      | upsert key (one per row)                                             |
| `executionStatus`                                    | `TemplateDataExecutionStatus` | `IDLE` / `QUEUED` / `RUNNING` / `COMPLETED` / `FAILED` / `CANCELLED` |
| `lastExecutionStartedAt`, `lastExecutionCompletedAt` | `Timestamp?`                  | convert with `timestampDate()`                                       |
| `lastExecutionError`                                 | `string?`                     | on `FAILED`                                                          |
| `chatId`                                             | `string?`                     | the row's execution chat                                             |
