pick_col¶
Type of operation: Projection
Description¶
Exclude all columns except the specified columns from the input dataset to the output dataset.
Note that the primary key and time columns must be picked.
For datasets that will be used to create downstream child datasets, pick_col
provides several useful benefits:
Clearly defines the dataset schema.
Preserves the order of the picked columns.
Prevents future columns added to an upstream parent being passed through to child datasets.
Usage¶
pick_col columnbinding_1, columnbinding_2, ...
Argument |
Type |
Optional |
Repeatable |
Restrictions |
---|---|---|---|---|
columnbinding |
expression |
no |
yes |
none |
Accelerable¶
pick_col is always accelerable if the input is accelerable. A dataset that only uses accelerable verbs can be accelerated, making queries on the dataset respond faster.
Examples¶
pick_col event_time:input_time, uid:data.request.sourceHost, status_code:int64(data.request.httpStatus), message:message, ok:int64(data.request.httpStatus) < 400
Re-shape the data to contain exactly the five columns ‘event_time’, ‘uid’, ‘status_code’, ‘message’, and ‘ok’.
Aliases¶
colpick
(deprecated)