drop
Discards all input records. Use this command when you have run a command with side effects but do not need the output, when you do not want to store results in a batch query, or when you want to measure the pure execution time of the previous command.
Command properties
| Item | Description |
|---|---|
| Command type | Processing query |
| Required permission | None |
| License usage | N/A |
| Parallel execution | Supported |
| Distributed execution | Runs on Control Node (reducer) |
Syntax
drop
Error codes
Parse errors
N/A
Runtime errors
N/A
Description
The drop command consumes all input records and does not pass them to the next command. It produces no output, so the query result is empty.
In a distributed environment, execution runs on the Control Node.
Examples
-
Discarding all records
table duration=1h web_logs | dropRetrieves the past hour of data from
web_logsand discards all results. Useful for measuring the execution time of the previous command. -
Running side effects only
table duration=1d web_logs | stats count by method | import method_stats | dropSaves the aggregation results to the
method_statstable and leaves no records in the query output.