> ## Documentation Index
> Fetch the complete documentation index at: https://www.integrate.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ETL: STRSPLITTOBAG

> Split a string into a bag (array) of substrings using a specified delimiter. Use STRSPLITTOBAG for parsing multi-value fields in ETL data pipelines.

## Description

Splits a string into a bag around matches of a delimiter.

## Syntax

`STRSPLITTOBAG(string[, delimiter_regex[, limit]])`

## Arguments

*string* - input string expression

*delimiter\_regex* - regular expression string delimiter. Optional with default '\s'.

*limit* - integer indicating the number of times the regular expression pattern is applied. Optional with default 0.

## Examples

`STRSPLITTOBAG('Mary:had:a little:lamb',':',3)` returns a bag `{Mary,had,a little:lamb}`

## Return value datatype

Bag

## Impact of null value

If input is null, returns null.
