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. (See also project.)
Syntax
T | project-away ColumnNameOrPattern [, ...]
Arguments
- T: The input table
- ColumnNameOrPattern: The name of the column or column wildcard-pattern to be removed from the output.
Returns
A table with columns that were not named as arguments. Contains same number of rows as the input table.
Tip
- To rename columns, use
project-rename. - To reorder columns, use
project-reorder. - You can
project-awayany columns that are present in the original table or that were computed as part of the query.
Examples
The 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
| A | B |
|---|---|
| 1 | 2 |
Removing columns starting with 'a'.
print a2='a2', b = 'b', a3='a3', a1='a1'
| project-away a*
| b |
|---|
| b |
See also
To choose what columns from the input to keep in the output, use project-keep.
Feedback
Submit and view feedback for