sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gwen Shapira (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SQOOP-2328) Sqoop import does not recognize Primary Key of a IBM DB2 table
Date Mon, 04 May 2015 08:35:07 GMT

     [ https://issues.apache.org/jira/browse/SQOOP-2328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gwen Shapira updated SQOOP-2328:
--------------------------------
    Fix Version/s:     (was: 1.4.6)
                   1.4.7

> Sqoop import does not recognize Primary Key of a IBM DB2 table
> --------------------------------------------------------------
>
>                 Key: SQOOP-2328
>                 URL: https://issues.apache.org/jira/browse/SQOOP-2328
>             Project: Sqoop
>          Issue Type: Bug
>    Affects Versions: 1.4.5
>         Environment: IBM DB2 9,.7V
>            Reporter: Atul Gupta
>             Fix For: 1.4.7
>
>
> Currently Sqoop import query does not recognize the PK of IBM DB2 table.
> When any sqoop query runs for DB2 table, it is not able to recognize the primary key(PK)
of that table, which is used as --split-by column implicitly. To run the Sqoop query it is
mandatory to give --split-by <colname> explicitly. 
> Query Given below:
> {code}
> sqoop import -Dmapred.job.queue.name=edwdev --connect jdbc:db2://dle-db2edw01.dl.karmalab.net:50001/EXPDEV01
--username='********' -P --table edwdev.mytable --hive-import --hive-table platdev.mytable_dynapart
--hive-external-table --target-dir /user/lbansal/hive_data_dynapart/testdir --hive-dynamic-partition
--hive-partition-key DATE --hive-partition-key-format aa-zzzz --incremental lastmodified --check-column
DATE --last-value '2014-10-22' --append
> gives the following error message:
> 14/11/21 02:17:32 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM edwdev.mytable
AS t WHERE 1=0
> 14/11/21 02:17:33 INFO tool.ImportTool: Incremental import based on column DATE
> 14/11/21 02:17:33 INFO tool.ImportTool: Lower bound value: '2014-10-22'
> 14/11/21 02:17:33 INFO tool.ImportTool: Upper bound value: '2014-11-21 02:17:33.680951'
> 14/11/21 02:17:34 INFO hive.metastore: Trying to connect to metastore with URI thrift://cheledwhdd004.karmalab.net:9083
> 14/11/21 02:17:34 INFO hive.metastore: Connected to metastore.
> 14/11/21 02:17:34 WARN tool.HiveUtil: platdev.mytable_dynapart table not found
> 14/11/21 02:17:34 WARN tool.HiveUtil: platdev.mytable_dynapart table not found
> 14/11/21 02:17:34 ERROR tool.ImportTool: Error during import: No primary key could be
found for table edwdev.mytable. Please specify one with --split-by or perform a sequential
import with '-m 1'.
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message