Computes PageRank over a consistent snapshot. Tunable damping (default 0.85), iteration bound (default 20), and convergence tolerance (default 1e-6); the response reports how many iterations actually ran. Optional personalization seeds steer both teleport and dangling mass toward weighted nodes, and the response flags personalized: true. Results are deterministic for a fixed graph state. 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
Compute PageRank importance scores.
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 pagerank 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_pagerank"}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
as_of | integer | no | Optional timestamp in microseconds. Reads the graph state visible at that instant. |
budget | GraphAnalyticsBudget | no | Optional snapshot size bounds. Defaults to the engine limits. |
damping | number | no | Optional damping factor. Defaults to 0.85. |
graph | string | yes | Graph name. |
max_iterations | integer | no | Optional iteration bound. Defaults to 20. |
personalization | object | no | Optional seed weights (node id to weight). When present, both teleport and dangling mass follow the seeds. |
tolerance | number | no | Optional convergence tolerance. Defaults to 1e-6. |
Plus the optional scope: branch and space (default to the session branch and the "default" space).
Returns
AnalyticsResult<GraphPagerankData>.
Errors
failed_precondition.engine.runtime_closednot_found.engine.branchinvalid_argument.engine.product_spaceinvalid_argument.engine.graph_namenot_found.engine.graphinvalid_argument.engine.graph_pagerank_optionsinvalid_argument.engine.graph_personalizationresource_exhausted.engine.graph_analytics_budgetinvalid_argument.executor.graph_analytics_budget
Invocation
- CLI:
strata graph pagerank - Wire type:
graph_pagerank