Median / Array Layer

Calculate the median value of each fixed-length numeric array. Similar to numpy.median() or R's median(). For even-length arrays, returns average of two middle values.

Example transformation (arrays of length 3):

arraysmedian
[1, 2, 3]2
[1, 5, 3]3
[4, null, 2]3
[null, null, null]null

Common applications:

  • Central tendency analysis
  • Outlier-resistant averaging
  • Statistical summaries
  • Distribution analysis

Note: All arrays must have the same fixed length. Only works with numeric arrays. Arrays containing all null values return null.

Table
0
0
Table

Select

column

The fixed-length numeric array column to analyze. All arrays must have same length:

  • Integer arrays: [1, 2, 3]
  • Float arrays: [1.5, 2.7, 3.2]
  • Mixed numeric arrays: [1, 2.5, 3]

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.