JSON_STRIP_NULLS (Lakehouse v1)
Removes all properties with null values from a JSON object.
Analyze Syntax
Section titled “Analyze Syntax”func.json_strip_nulls(<json_string>)Analyze Examples
Section titled “Analyze Examples”func.json_strip_nulls(func.parse_json('{"name": "alice", "age": 30, "city": null}'))
┌─────────────────────────────────────────────────────────────────────────────────────────────────┐│ func.json_strip_nulls(func.parse_json('{"name": "alice", "age": 30, "city": null}')) ││ String │├─────────────────────────────────────────────────────────────────────────────────────────────────┤│ {"age":30,"name":"Alice"} │└─────────────────────────────────────────────────────────────────────────────────────────────────┘SQL Syntax
Section titled “SQL Syntax”JSON_STRIP_NULLS(<json_string>)Return Type
Section titled “Return Type”Returns a value of the same type as the input JSON value.
SQL Examples
Section titled “SQL Examples”SELECT JSON_STRIP_NULLS(PARSE_JSON('{"name": "Alice", "age": 30, "city": null}'));
json_strip_nulls(parse_json('{"name": "alice", "age": 30, "city": null}'))|--------------------------------------------------------------------------+{"age":30,"name":"Alice"} |