我正在尝试使用sqoop job as,
将postgres sql中的增量数据导入到hdfs的目录中sqoop job --create incident_import -- import --connect jdbc:postgresql://IP ADDRESS:5432/Analyst_Bangalore --username postgres --password track@123 --map-column-java the_geom=String --table incident -m 1 --warehouse-dir /user/hive/warehouse/analyst_bangalore.db --incremental lastmodified --check-column incident_start_time --last-value "2016-08-03 14:33:48.087" --driver org.postgresql.Driver -- --schema analyst
如果我正在执行这项工作,它会给出ERROR,
sqoop job -exec incident_import
org.postgresql.util.PSQLException: ERROR: relation "incident" does not exist
Position: 17
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302)
at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:758)
2016-11-14 18:35:47,255 ERROR tool.ImportTool (ImportTool.java:run(613)) - Encountered IOException running import job: java.io.IOException: No columns to generate for ClassWriter
at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1651)
at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:107)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478)
任何人都有任何想法请与我分享。这需要一点点。