ArrayCompact (Beta)

🚩

This documentation describes one or more public beta features that are in development. Beta features are subject to quick, iterative changes; therefore the current user experience in the Sigma service can differ from the information provided in this page.

This page should not be considered official published documentation until Sigma removes this notice and the beta flag on the corresponding feature(s) in the Sigma service. For the full beta feature disclaimer, see Beta features.

📘

This feature isn't supported in all regions. To check if it is supported in your region, see Supported data platforms and feature compatibility.

The ArrayCompact function removes nulls from an array and returns the resulting array.

Syntax

ArrayCompact(array)

Function arguments

ArrayThe input array that nulls are removed from.

Usage notes

  • The input array should be constructed with an Array function.
  • If the input argument is null, the function returns null.

Examples

ArrayCompact(Array("East", "New York", Null)) => ["East", "New York"]

Removes Null from the array and returns the array ["East", "New York"].

ArrayCompact(Array(Null, Null, Null)) => []

Removes all nulls from the array and returns an empty array.

ArrayCompact(Null) => Null

As the input argument is null, returns Null.