drop_col
Aliases: coldrop (deprecated).
drop_col [columnname: col storable]+
Removes one or more named columns from the default dataset while preserving every other column, its type, and the dataset kind.
Column references
Each argument must be a whole-column reference on the default dataset (name, @.name, @["name"], and similar); qualified references that name a different dataset, expressions (including function calls), and paths into structured columns are rejected.
Time columns and primary keys
You cannot drop the active valid-from or valid-to column—change them with set_valid_from or set_valid_to first. On resources, a primary-key column cannot be dropped until it is removed from the primary key (for example with set_primary_key); on tables, events, and intervals, dropping a column that is listed in the primary key clears primary-key metadata instead.
Other schema effects
If a column participates in column-matching, dropping it also drops its paired matching column. Dropping columns can clear candidate keys, foreign keys, or grouping keys that depended on removed columns or on link definitions built from them. If a bound interface uses a dropped column as a required field binding, that interface is removed from the dataset; dropping a column that only backs optional interface fields leaves the interface in place with the remaining bindings. If the dropped column was the configured label field, that label assignment is cleared. If an explicit column sort order listed the dropped column, the sort order metadata is cleared. At least one column must remain. To keep a chosen subset of columns instead, use pick_col.
Categories
Accelerable
drop_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
drop_col month_number
Shows dropping a single column by name while every other column in the default dataset stays in the output schema.
drop_col title, price
Shows listing several columns in one drop_col call so each name is removed and the remaining columns are exactly those not mentioned in the argument list.
Updated about 6 hours ago