Skip to main content
The activities data table associated with your workspace logs record enrolments, node executions, and success/failure outcomes across all your tools and plays. These logs provide real-time visibility into how your workflows are performing—helping you identify bottlenecks, debug errors, and discover optimization opportunities.
You can query activities data from your data warehouse’s query editor, a Cargo data model, or the Sandbox query editor in the System of Record section of your workspace settings.
Adapt query syntax for your database (BigQuery or Snowflake). If using your own data warehouse, the dataset name matches the Dataset name from your System of Record configuration. If using Cargo’s managed BigQuery, contact the Cargo team for connection details.

Query from the CLI

Run these queries directly against your system of record with the CLI:
cargo-ai storage query execute \
  "SELECT kind, COUNT(*) AS count FROM activities
   WHERE kind IN ('workflowEntered','workflowLeft') GROUP BY kind"
With storage query, reference the activities table simply as activities — Cargo rewrites it to the correct physical table for your warehouse. The physical compute__activities / _compute.activities names in the Table naming conventions section below are only needed when querying your warehouse directly.

Understanding the activities table

The activities data is stored in the compute__activities table with the following structure:
ColumnDescription
_idUnique identifier for each activity
_timeTimestamp when the activity occurred
kindType of activity (see below)
model_uuidReference to the data model (if applicable)
workflow_uuidReference to the workflow
play_uuidReference to the play (if applicable)
tool_uuidReference to the tool (if applicable)
segment_uuidReference to the segment (for segment activities)
contextJSON object containing detailed activity information

Activity types

KindDescription
workflowNodeExecutedA specific node in a workflow completed execution
workflowEnteredA record entered a workflow
workflowLeftA record exited a workflow
segmentEnteredA record entered a segment
segmentLeftA record left a segment

Example: Track workflow node executions

Query all node executions for a specific workflow, including their status and any error messages:
SELECT
  _time,
  JSON_VALUE(context, '$.nodeSlug') AS node_name,
  JSON_VALUE(context, '$.nodeKind') AS node_type,
  JSON_VALUE(context, '$.nodeStatus') AS status,
  JSON_VALUE(context, '$.nodeErrorMessage') AS error_message
FROM [DATASET].compute__activities
WHERE kind = 'workflowNodeExecuted'
  AND JSON_VALUE(context, '$.workflowUuid') = 'your-workflow-uuid-here'
ORDER BY _time DESC;

Example: Track workflow throughput

Monitor how many records enter and exit your workflows over time:
SELECT
  DATE(_time) AS date,
  kind,
  COUNT(*) AS count
FROM [DATASET].compute__activities
WHERE kind IN ('workflowEntered', 'workflowLeft')
  AND workflow_uuid = 'your-workflow-uuid-here'
GROUP BY date, kind
ORDER BY date DESC;

Example: Identify failing nodes

Find nodes with the highest error rates:
SELECT
  JSON_VALUE(context, '$.nodeSlug') AS node_name,
  COUNT(*) AS total_executions,
  COUNTIF(JSON_VALUE(context, '$.nodeStatus') = 'failed') AS failures,
  ROUND(
    COUNTIF(JSON_VALUE(context, '$.nodeStatus') = 'failed') * 100.0 / COUNT(*),
    2
  ) AS failure_rate
FROM [DATASET].compute__activities
WHERE kind = 'workflowNodeExecuted'
  AND _time >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY)
GROUP BY node_name
HAVING failures > 0
ORDER BY failure_rate DESC;

Table naming conventions

Depending on your System of Record scope, use the appropriate table reference:
ScopeTable reference
BigQuery project-level[PROJECT_ID].[DATASET].compute__activities
BigQuery dataset-level[DATASET].compute__activities
Snowflake database-level[DATABASE]._compute.activities
Snowflake schema-level[DATABASE].[SCHEMA]._compute__activities
Replace bracketed values (e.g., [PROJECT_ID], [DATASET]) with your actual configuration values from the System of Record settings.