你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
set_intersect()
Applies to: ✅ Microsoft Fabric ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Returns a dynamic
array of the set of all distinct values that are in all arrays - (arr1 ∩ arr2 ∩ ...).
Syntax
set_intersect(
set1,
set2 [,
set3, ...])
Learn more about syntax conventions.
Parameters
Name | Type | Required | Description |
---|---|---|---|
set1...setN | dynamic |
✔️ | Arrays used to create an intersect set. A minimum of 2 arrays are required. See pack_array. |
Returns
Returns a dynamic array of the set of all distinct values that are in all arrays.
Example
range x from 1 to 3 step 1
| extend y = x * 2
| extend z = y * 2
| extend w = z * 2
| extend a1 = pack_array(x,y,x,z), a2 = pack_array(x, y), a3 = pack_array(w,x)
| project set_intersect(a1, a2, a3)
Output
Column1 |
---|
[1] |
[2] |
[3] |
print arr = set_intersect(dynamic([1, 2, 3]), dynamic([4,5]))
Output
arr |
---|
[] |