TRIM_ARRAY

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Trims an array by removing the last n elements.

  • array: The source array.
  • count: The number of elements to remove from the end.

Returns an array with the specified number of elements removed from the end.

  • If the count exceeds the array length, returns an empty array.
  • The count must be a non-negative integer.

Remove the last two elements from an array.

Returns array[1, 2], removing the last 2 elements (3 and 4).