BagToTuple

Description

Flattens a bag into a tuple. Once the bag is flattened into a tuple, items can be extracted by referencing tuple items.

Syntax

BagToTuple(bag_expression)

Examples

BagToTuple(JsonStringToBag('[1,2,3]')) returns a tuple with the items 1,2,3.

BagToTuple(JsonStringToBag('[1,2,3]')).$0 returns 1.

Return value datatype

Tuple

Impact of null value

If input is null, returns null.

Feedback and Knowledge Base