sqoop从postgres到hdfs的增量导入给org.postgresql.util.psqlexception

wlwcrazw  于 2021-05-29  发布在  Hadoop
关注(0)|答案(0)|浏览(334)

我正在尝试将增量数据从postgressql导入hdfs的目录,使用sqoop作业作为,

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

如果我在执行这个任务,它给出的错误是,

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)

任何人有任何想法请与我分享。这是一个小的要求。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题