Overview
The Schema Overview algorithm summarizes the structure of a graph by presenting the statistics of the source node schema, edge schema, end node schema, and the count of edges.
Syntax
- Command:
algo(schema_overview)
- Parameters:
Name |
Type |
Spec |
Default |
Optional |
Description |
---|---|---|---|---|---|
order | string | asc , desc |
/ | Yes | Sorts the results based on the edge count. |
Examples
The example graph is as follows:
Direct Return
Alias Ordinal | Type |
Description |
Columns |
---|---|---|---|
0 | []perGroup | Statistics showing the number of edges of a specific schema between two node schemas | node schema(src) , edge schema , node schema(dest) , count |
algo(schema_overview).params() as result
return result
Results: result
node schema(src) |
edge schema |
node schema(dest) |
count |
---|---|---|---|
account | follow | account | 2 |
account | like | movie | 1 |
movie | filmedIn | country | 1 |
director | direct | movie | 2 |
Stream Return
Alias Ordinal | Type |
Description |
Columns |
---|---|---|---|
0 | []perGroup | Statistics showing the number of edges of a specific schema between two node schemas | node schema(src) , edge schema , node schema(dest) , count |
algo(schema_overview).params().stream() as result
where result.`node schema(src)` = "account"
return result
Results: result
node schema(src) |
edge schema |
node schema(dest) |
count |
---|---|---|---|
account | follow | account | 2 |
account | like | movie | 1 |