Mysql表 - 表名 - companies_domains
company_id| company_name | domain
1 | LITOFF | LITOFF.IO
2 | HEWLETT PACKARD | HP.COM
3 | WORK DAY | WORDAY.COM
4 | MADISON REED | MR.COM
Hbase表 -
hbase table name - company_domains
column family - company_details
qualifiers name = com_na
= dom
where
com_na = company_name
dom = domain
这里在sqoop命令中,我们想逐步追加来自mysql的数据,但我不希望限定符名称与mysql中的相同。请编辑以下代码,因为限定符名称应为com_name = company_name dom = domain
sqoop import --connect jdbc:mysql://master.hadoop.local/emails --username root --password-file /user/hdfs/mysql_sqoop.password --table companies_domains --columns "company_id,company_name,domain" --hbase-table company_domains --column-family company_details --hbase-row-key company_id --driver com.mysql.jdbc.Driver -m 2 --incremental append --check-column company_id --last-value 0