kalor

导航

 

2013年3月29日

摘要: hive (student)> show tables;OKcoursestudent_testTime taken: 0.056 secondshive (student)> select * from course;OK1 ["English","Chinese","French","Japanese"]2 ["Chinese","French"]3 ["Chinese","French","Japanese& 阅读全文
posted @ 2013-03-29 22:25 kalor 阅读(1917) 评论(0) 推荐(0) 编辑
 
摘要: JSON表示法:employee_Kelvin = { "name": "John Doe", "salary": 100000.0, "subordinates": ["Mary Smith", "Todd Jones"], "deductions": { "Federal Taxes": .2, "State Taxes": .05, "Insurance": .1 }, "addr 阅读全文
posted @ 2013-03-29 19:47 kalor 阅读(449) 评论(0) 推荐(0) 编辑
 
摘要: hive (student)> create table if not exists course( > stu_num string comment 'the number of a student', > choose_course array<string> comment 'the choosing course of a student') > row format delimited > fields terminated by ':' > collec... 阅读全文
posted @ 2013-03-29 16:56 kalor 阅读(2652) 评论(0) 推荐(0) 编辑
 
摘要: hive (student_test)> use student;OKTime taken: 0.015 secondshive (student)> create table if not exists student_test( > id int comment 'the number of a student', > basic_info struct<name:string,age:int> comment 'the basic information of a student') > row format .. 阅读全文
posted @ 2013-03-29 15:46 kalor 阅读(7377) 评论(0) 推荐(0) 编辑
 
摘要: 从数据库economy表stocks中导入data到数据库human_resources表emp_stocksProblem 1: 无法查看本地临时目录emp_stocks中的数据000000_0,000001_0;原因是:自己居然在hive中的文件系统hdfs用dfs -cat file命令去查询,脑子进水了不是,应该先退出hdfs文件系统hive> quit;然后执行查询 cat /emp_stocks/000000_0; 如果将数据库economy表stocks中要查询的数据导入到hive中hdfs文件系统的一个临时目录,可用dfs -cat file查询。Problem 2: 在 阅读全文
posted @ 2013-03-29 12:56 kalor 阅读(2033) 评论(0) 推荐(0) 编辑