hive解析json嵌套數(shù)組 如何在Hive中使用Json格式數(shù)據(jù)?
如何在Hive中使用Json格式數(shù)據(jù)? https://code.google.com/p/hive-json-serde/本文將主要使用第二種方法。wget公司https://hive-json-s
如何在Hive中使用Json格式數(shù)據(jù)?
https://code.google.com/p/hive-json-serde/
本文將主要使用第二種方法。wget公司https://hive-json-serde.googlecode.com/files/hive-json-serde-0.2.jar
#Hive>添加jar/home/河源.lhy/develop/wankehttputest/hive-json-serde-0.2。Jarhive>#創(chuàng)建配置單元表創(chuàng)建表測(cè)試#json(id BIGINT,文本字符串,)行格式SERDE“org.apache.hadoop下載. 配置服務(wù)器2.JsonSerde“存儲(chǔ)為TEXTFILELOAD DATA LOCAL INPATH”測(cè)試.json“OVERWRITE INTO TABLE test在JSON之后,您可以使用select和其他語句進(jìn)行操作。注:這個(gè)serde是舊的,但是經(jīng)過測(cè)試,它支持0.12版本,沒有壓力。