cloudera/cdh-twitter-example — pull request #12 by DLade (2014-06-12 11:39:38+00:00)
Title: Hive SQL can not handle keys with dot or minus

Because Hive SQL can not handle keys with dot or minus (e.g. dot is used as path separator at SQL) the JSON keys were patched to replace dot or minus with underline ('_').

JSON example:
{"position.x":10,"position.y":10,"id":4711}

Hive table example:
ADD JAR /tmp/hive-serdes-1.0.1-SNAPSHOT.jar;

DROP TABLE example;
CREATE TABLE example (
position_x INT,
position_y INT,
id STRING
)
ROW FORMAT SERDE 'com.cloudera.hive.serde.JSONSerDe'
LOCATION '/user/json/example/';

SELECT * from example LIMIT 10;