presence
This page explains how to use the presence aggregation function in APL.
presence counts how many rows contain a non-null value for each specified field, returning a single map column of per-field counts.
Usage
Syntax
APL
Parameters
field1, field2, ...: One or more field names to count non-null occurrences for, or*to include every field in the current schema.GroupingColumn(optional): A column to group the results by.
Returns
Returns one map column named presence mapping each field name to its non-null row count.
Use case examples
Count non-null values across all fields
Query
APL
Output
| presence |
|---|
{"a":3,"b":3,"c":1} |
Count non-null values for specific fields
Query
APL
Output
| presence |
|---|
{"x":2,"z":2} |