You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -27,11 +31,15 @@ The `make-graph` operator builds a graph structure from tabular inputs of edges
27
31
|*Nodes1*, *Nodes2*|`string`|| The tabular expressions containing the properties of the nodes in the graph. |
28
32
|*NodesId1*, *NodesId2*|`string`|| The corresponding columns with the node IDs in *Nodes1*, *Nodes2* respectively. |
29
33
|*NodeIdPropertyName*|`string`|| The name of the property for node ID on the nodes of the graph. |
34
+
|*PartitionColumn*|`string`|| The column to partition the graph by. Creates separate graphs for each unique value in this column. |
35
+
|*GraphOperator*|`string`|| The graph operator to apply to each partitioned graph. |
30
36
31
37
## Returns
32
38
33
39
The `make-graph` operator returns a graph expression and must be followed by a [graph operator](graph-operators.md#supported-graph-operators). Each row in the source *Edges* expression becomes an edge in the graph with properties that are the column values of the row. Each row in the *Nodes* tabular expression becomes a node in the graph with properties that are the column values of the row. Nodes that appear in the *Edges* table but don't have a corresponding row in the *Nodes* table are created as nodes with the corresponding node ID and empty properties.
34
40
41
+
When using the `partitioned-by` clause, separate graphs are created for each unique value in the specified *PartitionColumn*. The specified *GraphOperator* is then applied to each partitioned graph independently, and the results are combined into a single output. This is particularly useful for multitenant scenarios where you want to analyze each tenant's data separately while maintaining the same graph structure and analysis logic.
42
+
35
43
> [!NOTE]
36
44
> Each node has a unique identifier. If the same node ID appears in both the *Nodes1* and *Nodes2* tables, a single node is created by merging their properties. If there are conflicting property values for the same node, one of the values is arbitrarily chosen.
37
45
@@ -115,6 +123,78 @@ edges
115
123
|---|---|---|
116
124
|Mallory|Bob|Trent|
117
125
126
+
### Multitenant partitioned graph
127
+
128
+
This example demonstrates using the `partitioned-by` clause to analyze a multitenant social network. The `partitioned-by` clause creates separate graphs for each unique value in the partition column (in this case, `tenantId`), applies the graph operator to each partition independently, and combines the results.
129
+
130
+
:::moniker range="azure-data-explorer"
131
+
> [!div class="nextstepaction"]
132
+
> <a href="https://data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AMeUb8gik1NlNY6mFrZr3USuVI%2BfrYqHqYWqO1OuwzaV57TyrY%2F0H8UCx2eE019V%2B1sq5wD5MPSpqyqoOVKpZO5pMbQuv5%2BNH5gVStlNYMvo4g9SpXuQgN6jQJS4aY15Z5UZnTfKkbKSgJLoFsUKGFaLunC9rMpXsNy4uSIE%2FuZwUJmP%2BLE3mZ8MRMfceIgs1%2B4x487cXhMwlpjt1FYReGGLPV7tobivV7OtHPi9NCJuzJlk3LKMm%2B5G50stopp0kLYUTvOT07pWUm4LBuVb9aWqjD%2BqOe3VIWcu%2FN8z2SkNJFU%2FoYle8LmQrE4hP1MAs3mm4MsAi%2F0VZB9aslNRqJO8%2BXEjf8xaD6utxkGailPara5ZNoPwV%2F7VBeOBA2FmnDqzXv81W21vIfmm5pw6%2Bl487yEqBCE08oUfhmBcPMGE%2FQXRTUs5i4YjSzP183wrd2UB%2BXXgAowc9F%2FdWOTw5OaloFcmURKmvmnXmsvrd%2B3H%2BqUO380ynnIbpujz86E%2B1NCR0aRUB1%2BB6dNz1YwVvIvuq1gRlum6XqgBE5TDaz51KXdhxptPDXzHaKuepXk5tl39YgCITZ%2BzQfQb5fk7Z0p99CUa5mq1P8FZTuk0NUPAAA%3D" target="_blank">Run the query</a>
133
+
::: moniker-end
134
+
135
+
```kusto
136
+
// Nodes table representing users across multiple tenants (organizations)
137
+
let nodes = datatable(userId:string, tenantId:string, name:string, department:string, role:string, location:dynamic)
0 commit comments