人口统计主题数据库.docx
《人口统计主题数据库.docx》由会员分享,可在线阅读,更多相关《人口统计主题数据库.docx(6页珍藏版)》请在第壹文秘上搜索。
1、人口统计在hive路径下:1 启动服务binive-servicemetastore&2 :启动hive:bin/hrve# 建库createdatabasedzxktj;# 进摩usedz-rkt;# 建表1createtab1.etb_ana1.ysis_of_f1.oating_popu1.ation(idit.regionstring,f1.oatingpopu1.ationstring)rowformatde1.imitedfie1.dsterminatedbyt;# 建表2Createtab1.etb_age_gender(idint.sectionstring,numberofp
2、eop1.estring,numberofboysstng,numberoffema1.estudentsstring)rowformatde1.imitedfie1.dsterminatedbyt;# 建表3createtab1.etb_an1.yss(idint.sourcenamestring.numberstring)rowformatde1.imitedfie1.dsterminatedbyt;# 建表4createtab1.etb_annua1.1._nationa1.(dint.particu1.arstring.umbeob1.e_rea1._time_user_statist
3、ics(dint.timestring.umbeofpeop1.estring)rowformatde1.mrtedfie1.dsterminatedbyt,;# 建表7createtab1.etb_statistics_working(idint.regionstring.numbefofresidentsstring.numberOfworkersstring)rowformatde1.imitedfie1.dsterminatedby,f:# 建表8Createtab1.etb_working_USeJstatistics(dint.nameofdtstrictstring.number
4、ofpeop1.estring)rowformatde1.imitedfie1.dsterminatedby,f;# 数据迁移1在SqOOP目录下:bin/sqoopimport-connectjdbcmysqyhadoop2.3306dzxrktj-usernameroot-passwordroot-tab1.etb_ana1.ysis_of_fIoating_popu1.ation-num-mappers1-hre-import-hwe-databasedzx.rkt-hve-tab1.etb_ana1.ysis_of_f1.oating_popu1.ation-fie1.ds-termi
5、ated-byAf-de1.ete-target-dir#数据迁移2在sqoop目录下bin/sqoopimport-connectjdbmysqhadoop2-3306dz-rktj-usernameroot-passwordroot-tab1.etb_age_gender-num-mappers1-hive-import-hive-databasedzx_rktj-hve-tab1.etb_age_gender-fie1.ds-terminated-byf-de1.ete-targetdir#数据迁移3在sqoop目录下:bin/sqoopimport-connectjdbcmysqiy/
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 人口统计 主题 数据库
