简体   繁体   English

KQL Kusto 使用一个项目重命名重命名多个列

[英]KQL Kusto renaming multiple colums with one project-rename

When i use summarize any() all my columns get a new name any_original name.当我使用 summarise any() 时,我的所有列都会获得一个新名称 any_original 名称。 I want to keep the original name or rename the any away我想保留原名或重命名任何

in Splunk used to do something like rename value(*) as * and that did the trick, in kql im not sure在 Splunk 中曾经做过类似 rename value(*) as * 之类的事情,这就是诀窍,在 kql 中我不确定

Screenshot截屏

ORIGINAL ANSWER (May 2021)原始答案(2021 年 5 月)

You can supply your own column names, like this:您可以提供自己的列名,如下所示:

MyTable
| summarize (Timestamp, Api, Application) = any(Timestamp, Api, Application)

UPDATE (Jun 2021)更新(2021 年 6 月)

Following your request, we've introduced a new aggregation function, called take_any() that behaves just like any() , but leaves the column names as is:根据您的要求,我们引入了一个新的聚合 function,称为take_any() ,其行为与any()类似,但保留列名:

For example:例如:

MyTable
| summarize take_any(Timestamp, Api, Application)

The output will contain 3 columns named: Timestamp, Api, Application. output 将包含 3 列,名为:时间戳、Api、应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM