Skip to navigation

Variant

View as Markdown

The Variant function converts the input value to the variant data type.

Usage

Variant(input)

input (required) The input you would like to be interpreted as a variant.

Notes

  • All variant data is interpreted as JSON.
  • The Variant function changes the input value’s data type, but does not otherwise change the input value.
  • The Variant function does not apply JSON formatting.
  • Arrays created with the Array, ArrayAgg, and ArrayAggDistinct functions retain the data type of their contents, and Sigma doesn’t treat them as variant data. See Create structured arrays.

Example

Variant([Cust Json as Text])
  • Returns:

Column headers for customer JSON text and customer JSON variant data, each with its corresponding data type icon.

Table comparing customer JSON strings with the same records converted to variant data.