【问题标题】:Kusto : summarize and display the group as csvKusto : 将组汇总并显示为 csv
【发布时间】:2020-05-21 18:17:51
【问题描述】:

在下面的查询中,我想显示该用户的电子邮件 ID 和唯一用户 ID。

customEvents
   //| where customDimensions.UserId == 'Error'
     | where  timestamp > ago(2d)
     | summarize values = dcount(tostring(customDimensions.UserId)) by tostring(customDimensions.email)

数据:

UserId email
1      someone@x.com
Error  someone@x.com
2      other@x.com
3      otherother@x.com
Error  otherother@x.com

预期输出:

someone@x.com.   1, Error
other@x.com      2
otherother@x.com 3, Error 

【问题讨论】:

    标签: azure-data-explorer


    【解决方案1】:

    你可以试试这个:

    datatable(UserId:string, Email:string)
    [
        '1',     'someone@x.com',
        'Error', 'someone@x.com',
        '2',     'other@x.com',
        '3',     'otherother@x.com',
        'Error', 'otherother@x.com',
    ]
    | summarize UserIds = strcat_array(make_set(UserId), ", ") by Email
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-05-10
      • 2020-09-14
      • 2021-05-07
      • 2016-11-15
      • 1970-01-01
      相关资源
      最近更新 更多