JSON_SET (Lakehouse v2)
在 JSON 文档的指定路径处设置值。
Analyze 语法
Section titled “Analyze 语法”func.json_set(get_column(table, 'data'), '$.age', 31)Analyze 示例
Section titled “Analyze 示例”func.json_set(get_column(table, 'data'), '$.age', 31)
┌──────────────┐│ updated JSON │└──────────────┘SQL 语法
Section titled “SQL 语法”JSON_SET(<data>, '$.age', 31)SQL 示例
Section titled “SQL 示例”SELECT JSON_SET(PARSE_JSON('{"name":"Alice"}'), '$.age', 30);
┌───────────────────────────┐│ {"name":"Alice","age":30} │└───────────────────────────┘