我有一个来自搜索查询的表,该表有5行1列(称为host_type)。我想以这样的方式转换表格,以便获得5列和1行。任何帮助将不胜感激。
这是我正在使用的查询:
host_type=* sourcetype=* index=* xyz | fields host_type
答案 0 :(得分:1)
Splunk Transpose命令可能会有所帮助:
transpose
Description
Returns the specified number of rows (search results) as columns (list of field values), such that each search row becomes a column.
Syntax
transpose [int] [column_name=<string>] [header_field=<field>] [include_empty=<bool>]
有关它的更多信息,请查看: http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Transpose