How do you handle null values when using the ARRAY_AGG function in BigQuery?
Using PostgreSQL, write a query against products and product_attributes that treats NULL attribute values as absent and returns an empty text array when no non-null values exist.
product_id, product_name, and attribute_valuesproduct_id| Column | Type | Description |
|---|---|---|
| product_idPK | INT | Unique product identifier |
| product_name | VARCHAR(100) | Product display name |
| Column | Type | Description |
|---|---|---|
| attribute_idPK | INT | Unique attribute record identifier |
| product_id | INT | Product associated with the attribute |
| attribute_value | VARCHAR(100) | Optional descriptive attribute value |