from_csv

from_csv

from_csv介绍

from_csv(csvStr, schema[, options]) - 根据给定的 csvStr 和 schema 返回一个结构体(struct)值。

Examples:

> SELECT from_csv('1, 0.8', 'a INT, b DOUBLE');
 {"a":1,"b":0.8}
> SELECT from_csv('26/08/2015', 'time Timestamp', map('timestampFormat', 'dd/MM/yyyy'));
 {"time":2015-08-26 00:00:00}

Since: 3.0.0