Skip to content

Slice Data

Slice Data cuts a list of records and keeps only a section of it. You set the start and end positions, and the component returns the records between them. Positions start counting at 0: the first record is 0, the second is 1, and so on.

When to use it

  • Keep the first 10 results of a search.
  • Test a flow with a few records before processing the full list.
  • Split a large list into sections to process it in parts.
  • Skip the first row of a list when it contains headers.

Configuration

FieldWhat it does
Data ListThe list of records you want to cut.
Start IndexPosition of the first record included. Default: 0 (the first one).
End IndexPosition where the section ends. That record is no longer included. Default: 1, which keeps only the first record.

For example, with Start Index 0 and End Index 10 you get the first 10 records, from 0 to 9.

Output

  • Sliced Data: the list with the records in the chosen section. If the positions go beyond the size of the list, you get the records that exist within the section.

Example

A news component returns 50 articles, but you only want to summarize the 5 most recent. You connect the list to Slice Data with Start Index 0 and End Index 5, and its output to the Summarizer.