Splunk Cloud

Search Reference

Download manual as PDF

Download topic as PDF


The collapse command is an internal, unsupported, experimental command. See About internal commands.


The collapse command condenses multifile results into as few files as the chunksize option allows. This command runs automatically when you use outputlookup and outputcsv commands.


... | collapse [chunksize=<num>] [force=<bool>]

Optional arguments

Syntax: chunksize=<num>
Description: Limits the number of resulting files.
Default: 50000
Syntax: force=<bool>
Description: If force=true and the results are entirely in memory, re-divide the results into appropriated chunked files.
Default: false


Example 1: Collapse results.

... | collapse

Last modified on 18 December, 2019
About internal commands

This documentation applies to the following versions of Splunk Cloud: 7.0.11, 7.0.13, 7.2.4, 7.2.6, 7.2.7, 7.2.8, 7.2.9, 7.2.10, 8.0.2001, 8.0.2003, 8.0.2004, 8.0.2006, 8.0.2007, 8.1.2008, 8.1.2009

Was this documentation topic helpful?

Enter your email address, and someone from the documentation team will respond to you:

Please provide your comments here. Ask a question or make a suggestion.

You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters