Docs menu · Reference

Computes weakly connected components over a consistent snapshot of the graph, ignoring edge direction. Every node maps to its component representative - the smallest node id in its component - and the response carries the distinct component count. Accepts an optional snapshot budget and as_of for time travel.

Analytics commands compute over a consistent snapshot of the visible graph and return a complete result payload in one response. They accept optional snapshot budgets and an as_of timestamp for time travel; results are deterministic for a fixed graph state.

Examples

Weakly-connected components.

CLI

$ strata graph create g
$ strata graph add-node g a
$ strata graph add-node g b
$ strata graph add-node g c
$ strata graph add-edge g a knows b
$ strata graph add-edge g b knows c
$ strata graph wcc g

Wire

{"graph":"g","type":"graph_create"}
{"graph":"g","node_id":"a","type":"graph_add_node"}
{"graph":"g","node_id":"b","type":"graph_add_node"}
{"graph":"g","node_id":"c","type":"graph_add_node"}
{"dst":"b","edge_type":"knows","graph":"g","src":"a","type":"graph_add_edge"}
{"dst":"c","edge_type":"knows","graph":"g","src":"b","type":"graph_add_edge"}
{"graph":"g","type":"graph_wcc"}

Parameters

NameTypeRequiredDescription
as_ofintegernoOptional timestamp in microseconds. Reads the graph state visible at that instant.
budgetGraphAnalyticsBudgetnoOptional snapshot size bounds. Defaults to the engine limits.
graphstringyesGraph name.

Plus the optional scope: branch and space (default to the session branch and the "default" space).

Returns

AnalyticsResult<GraphWccData>.

Errors

Invocation

  • CLI: strata graph wcc
  • Wire type: graph_wcc

agents: this page as markdown → /docs/reference/graph/analytics/wcc.md