Split Split

yaml
type: "io.kestra.core.tasks.storages.Split"

Split a file from the internal storage onto multiple files.

Examples

Split a file by size.

yaml
id: "split"
type: "io.kestra.core.tasks.storages.Split"
from: "kestra://long/url/file1.txt"
bytes: 10MB

Split a file by rows count.

yaml
id: "split"
type: "io.kestra.core.tasks.storages.Split"
from: "kestra://long/url/file1.txt"
rows: 1000

Split a file in a defined number of partitions.

yaml
id: "split"
type: "io.kestra.core.tasks.storages.Split"
from: "kestra://long/url/file1.txt"
partitions: 8

Properties

bytes

  • Type: string
  • Dynamic: ✔️
  • Required:

Split by file size.

Can be provided as a string like "10MB" or "200KB", or the number of bytes. Since we divide storage per line, it's not an hard requirements and files can be a larger.

from

  • Type: string
  • Dynamic: ✔️
  • Required:

The file to be split.

partitions

  • Type: integer
  • Dynamic: ✔️
  • Required:

Split by a fixed number of files.

rows

  • Type: integer
  • Dynamic: ✔️
  • Required:

Split by file rows count.

separator

  • Type: string
  • Dynamic:
  • Required:
  • Default:

The separator to used between rows

Outputs

uris

  • Type: array
  • SubType: string

The splitted file uris