# Analyse a network

Model / graph

network or graph analysis

Page: <https://meridian.online/operations/analyse-a-network>

## Status

Runs as a SQL step.

arcform carries it as a `sql:` step today.

## The DuckDB step

reachability by a recursive query

```sql
CREATE TEMP TABLE result AS
WITH RECURSIVE edges(src, dst) AS (VALUES ('a','b'),('b','c'),('c','d'),('x','y')),
reach(node, depth) AS (SELECT 'a', 0 UNION SELECT e.dst, r.depth + 1 FROM reach r JOIN edges e ON e.src = r.node)
SELECT * FROM reach ORDER BY depth;
SELECT * FROM result;
SELECT CASE WHEN ((SELECT map_from_entries(list((node, depth) ORDER BY node)) = MAP {'a': 0, 'b': 1, 'c': 2, 'd': 3} FROM result)) THEN 'as expected' ELSE error('the nodes reached from a are not b, c and d at depths 1 to 3') END AS verdict;
```

The statement builds its own data.

It needs nothing installed beyond DuckDB itself.

## Variants

- [Walk a parent-child hierarchy](https://meridian.online/operations/analyse-a-network/walk-a-parent-child-hierarchy): Follow parent-child links to build ancestor paths, a closure table of every ancestor and descendant, or totals rolled up each level.
- Analyse nodes and edges: Build a network from edge rows and compute statistics, partitions or views of its nodes and edges.
- Find a minimum spanning tree: Connect a set of points with the shortest total length of edges.

## What other tools call it

Meridian's classification; an independent blind rating agreed on 86.2% of 312 rows (exact class, version 2).

- Alteryx Designer: [`Network Analysis`](https://help.alteryx.com/current/en/designer/tools/predictive/network-analysis-tool.html) (read 2026-09-27)
- EasyMorph: [`Hierarchy path`](https://help.easymorph.com/doku.php?id=transformations:hierarchypath) (read 2026-09-27)
- EasyMorph: [`Roll up`](https://help.easymorph.com/doku.php?id=transformations:rollup) (read 2026-09-27)
- Apache Hop: [`Closure`](https://hop.apache.org/manual/latest/pipeline/transforms/closure.html) (read 2026-09-27)
- KNIME Analytics Platform: [`KNIME Network Mining (extension)`](https://api.hub.knime.com/extensions/org.knime.features.network) (read 2026-09-27)
- KNIME Analytics Platform: [`KNIME Network Mining distance matrix support (extension)`](https://api.hub.knime.com/extensions/org.knime.features.network.distmatrix) (read 2026-09-27)
- mlpack: [`mlpack_emst`](https://www.mlpack.org/doc/user/bindings/cli.html) (read 2026-09-27)
- Pentaho Data Integration: [`Closure Generator`](https://docs.pentaho.com/pdia-data-integration/9.3-data-integration/pdi-transformation-steps-reference-overview) (read 2026-09-27)
- RapidMiner Studio: [`Transition Graph`](https://docs.rapidminer.com/latest/studio/operators/modeling/correlations/transition_graph.html) (read 2026-09-27)
