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

ItemDescription
Command typeProcessing query
Required permissionNone
License usageN/A
Parallel executionSupported
Distributed executionRuns 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

  1. Discarding all records

    table duration=1h web_logs | drop
    

    Retrieves the past hour of data from web_logs and discards all results. Useful for measuring the execution time of the previous command.

  2. Running side effects only

    table duration=1d web_logs
    | stats count by method
    | import method_stats
    | drop
    

    Saves the aggregation results to the method_stats table and leaves no records in the query output.