schema_of_json

schema_of_json

schema_of_json 介绍

schema_of_json(json[, options]) - 返回JSON字符串的模式(schema)以DDL(数据定义语言)格式。

Examples:

> SELECT schema_of_json('[{"col":0}]');
 ARRAY<STRUCT<col: BIGINT>>
> SELECT schema_of_json('[{"col":01}]', map('allowNumericLeadingZeros', 'true'));
 ARRAY<STRUCT<col: BIGINT>>

Since: 2.4.0