错误 orm.ClassWriter:没有 Java 类型 SQL 类型 -8 列 AAA$T
ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$T
我在oracle db中有一个视图,在视图中有一列是ROWID列,
一旦我尝试将负载导入 sqoop,它就会抛出以下错误:
.
.
.
17/09/14 08:15:32 INFO manager.OracleManager: Time zone has been set to GMT
17/09/14 08:15:32 INFO manager.SqlManager: Executing SQL statement: select * from user1.table1 where (1 = 0)
17/09/14 08:15:32 INFO manager.SqlManager: Executing SQL statement: select * from user1.table1 where (1 = 0)
17/09/14 08:15:32 INFO manager.SqlManager: Executing SQL statement: select * from user1.table1 where (1 = 0)
17/09/14 08:15:32 ERROR orm.ClassWriter: Cannot resolve SQL type -8
17/09/14 08:15:32 ERROR orm.ClassWriter: Cannot resolve SQL type -8
17/09/14 08:15:32 ERROR orm.ClassWriter: Cannot resolve SQL type -8
17/09/14 08:15:32 ERROR orm.ClassWriter: Cannot resolve SQL type -8
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.NullPointerException
java.lang.NullPointerException
at org.apache.sqoop.orm.ClassWriter.parseNullVal(ClassWriter.java:1389)
.
.
.
我用来导入数据的命令:
sqoop import --connect "jdbc:oracle:thin:@172.20.50.111:1521/abc" \
--username user1 \
--password "passes" \
--query 'select * from user1.table1 where $CONDITIONS' \
--hive-import \
--create-hive-table \
--hive-table sv.table1 \
--map-column-hive 'AAA$col'=STRING \
--target-dir "/home/table1" \
--m 1
我知道不能直接导入 ROWID,所以我使用 --map-column-hive 选项。
我还能尝试什么?
请帮忙。
Java创建POJO也需要映射。
添加--map-column-java 'AAA$col'=String
我在oracle db中有一个视图,在视图中有一列是ROWID列, 一旦我尝试将负载导入 sqoop,它就会抛出以下错误:
.
.
.
17/09/14 08:15:32 INFO manager.OracleManager: Time zone has been set to GMT
17/09/14 08:15:32 INFO manager.SqlManager: Executing SQL statement: select * from user1.table1 where (1 = 0)
17/09/14 08:15:32 INFO manager.SqlManager: Executing SQL statement: select * from user1.table1 where (1 = 0)
17/09/14 08:15:32 INFO manager.SqlManager: Executing SQL statement: select * from user1.table1 where (1 = 0)
17/09/14 08:15:32 ERROR orm.ClassWriter: Cannot resolve SQL type -8
17/09/14 08:15:32 ERROR orm.ClassWriter: Cannot resolve SQL type -8
17/09/14 08:15:32 ERROR orm.ClassWriter: Cannot resolve SQL type -8
17/09/14 08:15:32 ERROR orm.ClassWriter: Cannot resolve SQL type -8
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR orm.ClassWriter: No Java type for SQL type -8 for column AAA$col
17/09/14 08:15:32 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.NullPointerException
java.lang.NullPointerException
at org.apache.sqoop.orm.ClassWriter.parseNullVal(ClassWriter.java:1389)
.
.
.
我用来导入数据的命令:
sqoop import --connect "jdbc:oracle:thin:@172.20.50.111:1521/abc" \
--username user1 \
--password "passes" \
--query 'select * from user1.table1 where $CONDITIONS' \
--hive-import \
--create-hive-table \
--hive-table sv.table1 \
--map-column-hive 'AAA$col'=STRING \
--target-dir "/home/table1" \
--m 1
我知道不能直接导入 ROWID,所以我使用 --map-column-hive 选项。 我还能尝试什么?
请帮忙。
Java创建POJO也需要映射。
添加--map-column-java 'AAA$col'=String