Columns

Kusto 中的每个和每个表格格式数据流都是一个包含列和行的矩形网格。Every table in Kusto, and every tabular data stream, is a rectangular grid of columns and rows. 表中的每一列都有名称和特定的标量数据类型Every column in the table has a name and a specific scalar data type. 表或表格格式数据流的列是有序的,因此,列在表的列集合中也有特定的位置。The columns of a table or a tabular data stream are ordered, so a column also has a specific position in the table's collection of columns.

说明Notes

  • 列名区分大小写。Column names are case-sensitive.
  • 列名必须遵循实体名称的规则。Column names follow the rules for entity names.
  • 每个表的列数的最大限制是 10,000。Maximum limit of columns per table is 10,000.

在查询中,列通常只按名称引用。In queries, columns are generally references by name only. 列只能出现在表达式中,而表达式所在的查询运算符决定了表或表格格式数据流,因此不需要进一步限定列名的范围。They can only appear in expressions, and the query operator under which the expression appears determines the table or tabular data stream, so the column's name need not be further scoped. 例如,在下面的查询中,我们有一个未命名的表格格式数据流(通过包含单个列 (c) 的 datatable 运算符来定义)。For example, in the following query we have an unnamed tabular data stream (defined through the datatable operator that has a single column, c. 然后,将根据该列的值的谓词对表格格式数据流进行筛选,从而生成一个具有相同列但行数较少的新的未命名表格格式数据流。The tabular data stream is then filtered by a predicate on the value of that column, producing a new unnamed tabular data stream with the same columns but fewer rows. 然后,as 运算符命名表格格式数据流,其值作为查询结果返回。The as operator then names the tabular data stream and its value is returned as the results of the query. 请特别注意如何才能按名称引用列 c 而不需要引用其容器(实际上,该容器没有名称):Note in particular how the column c is referenced by name without a need to reference its container (indeed, that container has no name):

datatable (c:int) [int(-1), 0, 1, 2, 3]
| where c*c >= 2
| as Result

正如在关系数据库中常见的那样,行有时称为“记录”,列有时称为“属性”。As is often common in the relational databases world, rows are sometimes called records and columns are sometimes called attributes.

若要详细了解如何管理列,可参阅管理列Details on managing columns can be found under managing columns.