Welcome to the Alteryx Knowledge Base

How To: Split Output Into Multiple Files with Specific Record Counts
user

Created/Edited - 7/24/2026 by Dan Chapman | Alteryx

How To

Split an Output into Multiple Files with Specific Record Counts

Sometimes, you may want to write data to multiple files, with each file containing a specific number of records. You can leverage a Record ID column to do exactly that!

Procedure
  1. Add a Record ID tool at the end of your workflow and leave the default settings

  2. Add a Formula tool
    1. Add a new field called 'GroupID' and change the type to Int32
    2. In the Expression box, type in the formula below,replacing 25 with your desired number of records perfile
       CEIL([RecordID]/25)
  3. Add an Output tool
    1. At the bottom of the Configuration window, check the box that says 'Take File/Table Name From Field'
    2. Leave the option 'Append Suffix to File/Table Name'
    3. Select the GroupID field in the 'Field Containing File Name...' and choose whether or not you want to 'Keep Field in Output'

A sample workflow is attached.

Attachments

Split Output Into Groups of Records.yxzp

Was this article helpful?