Hive 使用sqoop从SQL Server导入时存储到配置单元外部表中的空值

Hive 使用sqoop从SQL Server导入时存储到配置单元外部表中的空值,hive,sqoop,Hive,Sqoop,SQL Server表MSR(包含1000条记录)列(ID int、LastName varchar、FirstName varchar、age int) 已创建配置单元外部表: hive> create external table msrhivedb.hivetab(id int,lastname string,firstname string,age int) > row format delimited > fields terminated by ' ' > s

SQL Server表
MSR
(包含1000条记录)列(ID int、LastName varchar、FirstName varchar、age int)

已创建配置单元外部表:

hive> create external table msrhivedb.hivetab(id int,lastname string,firstname string,age int)
> row format delimited
> fields terminated by ' '
> stored as textfile;
现在尝试使用以下sqoop命令将SQL Server表导入配置单元:

sqoop import --connect 'jdbc:sqlserver://10.25.3.196;username=hadoop1;password=London123;databaseName=AdventureWorks2012' --table MSR --hive-import --hive-table msrhivedb.hivetab --target-dir /hdfsfile -m 1
但是空值正在加载到配置单元外部表中

请为这个问题提出解决方案


提前感谢。

“空值”:在所有行上?在几排?在所有栏目上?在某些列上?您是否查看了Sqoop创建的HDFS文件,以检查默认情况下使用的分隔符类型?首先,您是否阅读了“将数据导入配置单元”一章中的《Sqoop用户指南》,特别是默认列分隔符是
\01
,而不是“空格”?“空值”:在所有行上?在几排?在所有栏目上?在某些列上?您是否查看了Sqoop创建的HDFS文件,以检查默认情况下使用的分隔符类型?首先,您是否阅读了将数据导入配置单元一章中的Sqoop用户指南,特别是默认列分隔符是
\01
,而不是“空格”?
sqoop import --connect 'jdbc:sqlserver://10.25.3.196;username=hadoop1;password=London123;databaseName=AdventureWorks2012' --table MSR --hive-import --hive-table msrhivedb.hivetab --target-dir /hdfsfile -m 1