Sum / Array Layer

Calculate the sum of elements in fixed-length numeric arrays. Similar to numpy.sum() or R's sum(). Returns the total of all non-null elements in each array.

Example transformation (arrays of length 3):

arrayssum
[1, 2, 3]6
[10, 20, 30]60
[1, null, 3]4
[1.5, 2.5, 3.0]7.0

Common applications:

  • Total calculations
  • Aggregate scores
  • Cumulative values
  • Revenue totals
  • Batch processing

Note: Arrays must have the same fixed length across all rows. Arrays with null values ignore nulls in summation. Only works with numeric arrays.

Table
0
0
Table

Select

column

The fixed-length numeric array column to sum. Only supports numeric arrays:

  • Integer arrays: [1, 2, 3]
  • Float arrays: [1.5, 2.7, 3.2]
  • Mixed numeric arrays: [1, 2.5, 3] All arrays must have the same length. Non-numeric arrays will result in null values

Name for the new column. If not provided, the system generates a unique name. If AsColumn matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.