This documentation is for Sankey Visualization by Dataflect version 1.0.4. For older versions of Dataflect documentation contact us at support@dataflect.com.
For additional information, visit dataflect.com.
Render a Sankey diagram from any search that outputs exactly three columns:
The visualization aggregates results across pages automatically, but you should aggregate in SPL for best performance.
Your final pipeline must end with a table like:
source | target | value |
---|---|---|
A | B | 10 |
A | C | 5 |
B | D | 7 |
Notes:
value
must be numeric (use tonumber()
if needed).rename
them to source
, target
, value
.| makeresults
| eval flows="S1>A 10;S1>B 5;S2>A 3;S2>C 7;S3>B 8;A>X 9;A>Y 4;B>X 6;B>Y 5;C>Y 7;X>Z1 8;X>Z2 7;Y>Z2 9;Y>Z3 6"
| makemv delim=";" flows
| mvexpand flows
| rex field=flows "(?<source>[^> ]+)\s*>\s*(?<target>[^ ]+)\s+(?<value>\d+)"
| eval value=tonumber(value)
| table source target value
<your base search producing src, dst, count>
| stats sum(count) as value by src dst
| rename src as source dst as target
| where value > 0
| table source target value
Tip: Use By source or By target to emphasize fan-out vs. fan-in relationships. Use Gradient to show flow transitions.
Tip: Switch between Left, Center, Right, and Justify on datasets with multiple interior layers to see distinct layouts.
Always aggregate before the final table
:
... | stats sum(value) as value by source target | where value > 0
(source, target)
pairs to a reasonable size for interactivity.