Welcome to the Alteryx Knowledge Base
How To: Split Output Into Multiple Files with Specific Record Counts
Created/Edited -
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
- Add a Record ID tool at the end of your workflow and leave the default settings
- Add a Formula tool
- Add a new field called 'GroupID' and change the type to Int32
- In the Expression box, type in the formula below,replacing 25 with your desired number of records perfile
CEIL([RecordID]/25)
- Add an Output tool
- At the bottom of the Configuration window, check the box that says 'Take File/Table Name From Field'
- Leave the option 'Append Suffix to File/Table Name'
- 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
Was this article helpful?