Member since
07-31-2016
7
Posts
1
Kudos Received
0
Solutions
07-31-2016
03:51 PM
I put into a string field in hive table and query it using get_json_object. That works for me. But i have another set of data in HDFS like. 1023,UK,{"cities":{"city1":"London","city2":"Birmingham","city3":"Liverpool"},"universities":{"universities1":"Cambridge","universities2":"Oxford"}},07-30-2016 So i want to store it in a hive table with schema like: create table data (SerNo int, country string , detail string,date string ) Then what should be the table definition so that {"cities: ..... }
will come as one column and rest with other ? what should be the column
separator ? If i put everything as one string field in hive table , then how i query SerNo ,country and date column. Is it possible by get_json_object ?
... View more
Labels:
- Labels:
-
Apache Hadoop
-
Apache Hive
07-30-2016
02:23 PM
Thanks @Simon, I put into a string field in hive table and query it using get_json_object. That works for me. But i have another set of data in HDFS like. 1023,UK,{"cities":{"city1":"London","city2":"Birmingham","city3":"Liverpool"},"universities":{"universities1":"Cambridge","universities2":"Oxford"}},07-30-2016 So i want to store it in a hive table with schema like: create table data (SerNo int, country string , detail string,date string ) Then what should be the table definition so that {"cities: ..... } will come as one column and rest with other ? what should be the column separator ? If i put everything as one string field in hive table , then how i query SerNo ,country and date column. Is it possible by get_json_object ?
... View more
07-26-2016
07:09 PM
I have a table name EmpData in mySql server with two field as EmpID (INT) and Details (nvarchar). Deatils field contain JSON string . EmpID Details 567 { "name": "Michel","address":{"house no":"12","street":"Johnson road","city":"London","country":"UK"}} 927 { "name": "John","address":{"house no":"99","street":"Johnson road","city":"London","country":"UK"}} I want to import "Details" field JSON data into HDP hive table EmpHiveStore and query on hive table like SELECT name,address.street from EmpHiveStore; Is there any way to import JSON field data into Hive table using sqoop ? Thank You.
... View more
Labels:
- Labels:
-
Apache Hive
-
Apache Sqoop