project-away 运算符project-away operator

从输入中选择要从输出中排除的列。Select what columns from the input to exclude from the output.

T | project-away price, quantity, zz*

结果中列的顺序取决于列在表中的原始顺序。The order of the columns in the result is determined by their original order in the table. 仅删除已指定为参数的列。Only the columns that were specified as arguments are dropped. 其他列会包括在结果中。The other columns are included in the result. (另请参阅 project。)(See also project.)


T | project-away ColumnNameOrPattern [, ...]T | project-away ColumnNameOrPattern [, ...]


  • T :输入表T : The input table
  • ColumnNameOrPattern:要从输出中删除的列或列通配符模式的名称。ColumnNameOrPattern: The name of the column or column wildcard-pattern to be removed from the output.


一个包含未指定为参数的列的表。A table with columns that were not named as arguments. 包含与输入表相同的行数。Contains same number of rows as the input table.


  • 若要重命名列,请使用 project-renameTo rename columns, use project-rename.
  • 若要对列重新排序,请使用 project-reorderTo reorder columns, use project-reorder.
  • 可以 project-away 存在于原始表中或已作为查询的一部分进行计算的任何列。You can project-away any columns that are present in the original table or that were computed as part of the query.


输入表 T 具有属于 long 类型的三列:ABCThe input table T has three columns of type long: A, B, and C.

datatable(A:long, B:long, C:long) [1, 2, 3]
| project-away C    // Removes column C from the output
11 22

删除以“a”开头的列。Removing columns starting with 'a'.

print a2='a2', b = 'b', a3='a3', a1='a1'
| project-away a*

请参阅See also

若要从输入中选择要保留在输出中的列,请使用 project-keepTo choose what columns from the input to keep in the output, use project-keep.