Skip to content

xtaci/json2hive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

json2hive

[![Build Status][1]][2] [1]: https://travis-ci.org/xtaci/json2hive.svg?branch=master [2]: https://travis-ci.org/xtaci/json2hive

json2hive generates hive schemas(with type guesses) from json documents

usage

$ go get github.com/xtaci/json2hive
$ json2hive < test.json
CREATE EXTERNAL TABLE test (
  items
    ARRAY<
      STRUCT<
      property:INT,
      name:STRING,
      id:INT,
      count:INT>>,
  items2
    ARRAY<
      MAP<STRING, INT>>,
  pointsfloat
    ARRAY<FLOAT>,
  foo
    STRUCT<
    bar:STRING,
    quux:STRING,
    level1:
      STRUCT<
      l2string:STRING,
      l2struct:
        STRUCT<
        level3:STRING>>>,
  wibble STRING,
  wobble
    ARRAY<
      STRUCT<
      entry:INT,
      EntryDetails:
        STRUCT<
        details1:STRING,
        details2:INT>>>,
  points
    ARRAY<INT>,
  ts BIGINT,
  description STRING
)

About

generate hive schema from a json document

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages