{"id":23451534,"url":"https://github.com/kanga333/j2h","last_synced_at":"2025-04-13T20:36:19.574Z","repository":{"id":57693740,"uuid":"93141418","full_name":"kanga333/j2h","owner":"kanga333","description":"j2h is a tool to convert json to hive ddl.","archived":false,"fork":false,"pushed_at":"2017-07-13T16:45:27.000Z","size":59,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-27T11:01:33.156Z","etag":null,"topics":["golang","hive","hql","json"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kanga333.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-02T07:53:42.000Z","updated_at":"2024-03-29T05:59:24.000Z","dependencies_parsed_at":"2022-09-26T21:00:52.468Z","dependency_job_id":null,"html_url":"https://github.com/kanga333/j2h","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanga333%2Fj2h","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanga333%2Fj2h/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanga333%2Fj2h/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanga333%2Fj2h/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kanga333","download_url":"https://codeload.github.com/kanga333/j2h/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248780001,"owners_count":21160456,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","hive","hql","json"],"created_at":"2024-12-24T00:26:14.612Z","updated_at":"2025-04-13T20:36:19.535Z","avatar_url":"https://github.com/kanga333.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# j2h\n\nj2h is a tool to convert json to hive ddl.\n\n## Installation\n\n```sh\n$ go get github.com/kanga333/j2h\n```\nor  \n\nDownload the binary directly from the release page.\n\n## Usage\n\n```sh\n$ j2h -help\nj2h is a tool to convert json to hive ddl\n\nUsage: j2h \u003coption\u003e\n  -json-path string\n        Path of json file.\n  -version\n        Print version information.\n```\n\n## Example\n\n```json:test.json\n{\n  \"foo\": {\n    \"bar\": [\n      10,\n      21,\n      20\n    ],\n    \"baz\": [\n      [\n        1.1,\n        1.2\n      ],\n      [\n        1.3,\n        1.4\n      ]\n    ],\n    \"hoge\": \"string\"\n  },\n  \"piyo\": true\n}\n```\n\n```sh\n$ j2h -path test.json\ncreate external table json_data(\n  foo struct\u003c\n    bar:array\u003cint\u003e,\n    baz:array\u003c\n      array\u003cdouble\u003e\n    \u003e,\n    hoge:string\n  \u003e,\n  piyo boolean\n)\n```\n\n## Restrictions\n\n- Hive Reserved words are output in lowercase letters.\n- It does not correspond to the output that converts json to map of hive.\n- All integers are output as int type.\n- All decimals are output as double type.\n- The null type of json is converted to the binary type of hive.\n- If the array element type of json is mixed, it is converted to binary type of hive.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanga333%2Fj2h","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkanga333%2Fj2h","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanga333%2Fj2h/lists"}