Pattern: Split Dataset by Variable Maximum Number of Rows

This workflow allows one to upload a .xlsx or .csv file, and split rows into separate datasets (tables) by a variable maximum value (default 100) to be manipulated, reordered, validated, etc in an inline batch workflow. The pattern could be useful for:

  • Generation of flat upload files for another system, where only a certain number of rows can be processed as a time
  • Conversion of a data table to separate batches of JSON-formatted pairs/arrays, which could be used to make an API call to another system (more here)

Primary formula used is as follows:

columns['Grouping'] = Math.ceil(rowIndex / fields['max'])

Sign In or Register to comment.