{"rsdb":{"rid":"309125","subhead":"","postdate":"0","aid":"224287","fid":"117","uid":"1","topic":"1","content":"
\n
\n \n \u7248\u6743\u58f0\u660e\uff1a\u4e2a\u4eba\u539f\u521b\uff0c\u8f6c\u8f7d\u8bf7\u6807\u6ce8\uff01 https:\/\/blog.csdn.net\/Z_Date\/article\/details\/84035052 <\/div>\n \n \n
\n

\u5c06\u6570\u636e\u5bfc\u5165\u5230hive\u4e2d\uff0c\u4f46\u662f\u5b9e\u9645\u4e0a\u6765\u8bf4hive\u4e2d\u7684\u6570\u636e\u4e5f\u662f\u5728hdfs\u4e0a\u8fdb\u884c\u4fdd\u5b58\u7684\u3002\u5728\u8fdb\u884c\u5bfc\u5165hive\u7684\u672c\u8d28\u5176\u5b9e\u5c31\u662f\u5148\u628a\u6570\u636e\u5bfc\u5165\u5230hdfs \u5728\u4ecehdfs\u628a\u6570\u636e\u8fc1\u79fb\u5230hive\u8868\u6240\u5728\u7684hdfs\u8def\u5f84<\/p>\n\n

\u8303\u4f8b\uff1a\u4ecemysql\u6570\u636e\u5e93\u4e2d\u5bfc\u5165\u6570\u636e\u5230hive\u4e2d<\/p>\n\n

\nsqoop import \\\n--connect jdbc:mysql:\/\/mini3:3306\/hive \\\n--username root \\\n--password Root123@ \\\n--table tohdfs \\\n--hive-import \\\n--hive-database student \\\n--hive-table stu_info \\\n--target-dir \/tohdfs3 \\\n--fields-terminated-by '\\t' \\\n--num-mappers 1 <\/code><\/pre>\n\n

\u4e4b\u540e\u5728hive\u4e2d\u51c6\u5907\u8981\u5bfc\u5165\u7684\u6570\u636e\u5e93\u4ee5\u53ca\u6570\u636e\u8868<\/p>\n\n

\ncreate database student;<\/code><\/pre>\n\n

\u521b\u5efa\u6570\u636e\u8868\uff0c\u51c6\u5907\u63a5\u6536\u5bfc\u5165\u7684\u6570\u636e<\/p>\n\n

\ncreate table stu_info(id int,name string)\nrow format delimited fields terminated by '\\t';<\/code><\/pre>\n\n

<\/p> <\/div>\n <\/div>","orderid":"0","title":"Sqoop   ------- \u5c06mysql\u7684\u6570\u636e\u5bfc\u5165\u5230hive\u4e2d","smalltitle":"","mid":"0","fname":"Hive","special_id":"0","bak_id":"0","info":"0","hits":"480","pages":"1","comments":"0","posttime":"2019-05-16 00:55:38","list":"1557939338","username":"admin","author":"","copyfrom":"","copyfromurl":"","titlecolor":"","fonttype":"0","titleicon":"0","picurl":"https:\/\/www.cppentry.com\/upload_files\/","ispic":"0","yz":"1","yzer":"","yztime":"0","levels":"0","levelstime":"0","keywords":"Sqoop<\/A>  <\/A> -------<\/A> mysql<\/A> \u6570\u636e<\/A> \u5bfc\u5165<\/A> hive<\/A>","jumpurl":"","iframeurl":"","style":"","template":"a:3:{s:4:\"foot\";s:0:\"\";s:8:\"bencandy\";s:0:\"\";s:4:\"head\";s:0:\"\";}","target":"0","ip":"47.106.78.186","lastfid":"0","money":"0","buyuser":"","passwd":"","allowdown":"","allowview":"","editer":"","edittime":"0","begintime":"0","endtime":"0","description":" \u7248\u6743\u58f0\u660e\uff1a\u4e2a\u4eba\u539f\u521b\uff0c\u8f6c\u8f7d\u8bf7\u6807\u6ce8\uff01 https:\/\/blog.csdn.net\/Z_Date\/article\/details\/84035052 \u5c06\u6570\u636e\u5bfc\u5165\u5230hive\u4e2d\uff0c\u4f46\u662f\u5b9e\u9645\u4e0a\u6765\u8bf4hive\u4e2d\u7684\u6570\u636e..","lastview":"1719085357","digg_num":"0","digg_time":"0","forbidcomment":"0","ifvote":"0","heart":"","htmlname":"","city_id":"0"},"page":"1"}