sqoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dhandapani, Karthik" <Karthik.Dhandap...@CVSCaremark.com>
Subject RE: Oraoop - Sqoop Failed when there is no data in the Souce table
Date Mon, 08 Dec 2014 16:42:42 GMT
Abe,

Today I found this issue happens only with brand new empty table. If few records are inserted
and deleted or truncated, the Sqoop completes with 0 records.
Sqoop Version : 1.4.4

sqoop import -D mapred.child.java.opts="-Djava.security.egd=file:/dev/./urandom" -libjars
$HIVE_LIB_JARS --connect jdbc:oracle:thin:@server:port:sid --table ods.XXXXX_LOG --username
zzzzz --password-file /user/$USER/pwd --as-textfile --fields-terminated-by '\001' --split-by
EMP_NBR --target-dir /dev/ XXXXX_LOG/20141209 --m 5 --where "(TIMESTAMP_DT > TO_DATE('20150101000000','YYYYMMDDHH24MISS')
AND TIMESTAMP_DT <= TO_DATE('20160101000000','YYYYMMDDHH24MISS') AND TYP in ('I','A','D'))"
--null-string '\\N' --null-non-string ''

Log output

14/12/08 11:24:39 INFO sqoop.Sqoop: Running Sqoop version: 1.4.4.2.1.2.0-402
14/12/08 11:24:41 INFO manager.SqlManager: Using default fetchSize of 1000
14/12/08 11:23:55 INFO oraoop.OraOopManagerFactory:
***********************************************************************************
*** Using Quest® Data Connector for Oracle and Hadoop 1.7.0.2.1.1.0-385-hdp-385 ***
*** Copyright 2012 Quest Software, Inc.                                         ***
*** ALL RIGHTS RESERVED.                                                        ***
***********************************************************************************
14/12/08 11:23:55 INFO oraoop.OraOopManagerFactory: Oracle Database version: Oracle Database
11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
14/12/08 11:23:55 INFO oraoop.OraOopManagerFactory: This Oracle database is not a RAC. …..
…..
…..
14/12/08 10:28:52 INFO oraoop.OracleConnectionFactory: Initializing Oracle session with SQL
: alter session disable parallel query
14/12/08 10:28:52 INFO oraoop.OracleConnectionFactory: Initializing Oracle session with SQL
: alter session set "_serial_direct_read"=true
14/12/08 10:28:52 INFO oraoop.OracleConnectionFactory: Initializing Oracle session with SQL
: alter session set tracefile_identifier=oraoop
14/12/08 10:28:54 FATAL oraoop.OraOopDataDrivenDBInputFormat: The table XXXXX_LOG does not
contain any data.
14/12/08 10:28:54 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException:
The table XXXXX_LOG does not contain any data.


Thanks,
Karthik

From: Abraham Elmahrek [mailto:abe@cloudera.com]
Sent: Friday, December 05, 2014 7:35 PM
To: user@sqoop.apache.org
Subject: Re: Oraoop - Sqoop Failed when there is no data in the Souce table

Could you provide your Sqoop version number and sqoop command? I suspect you're using the
"--direct" option, which will use Oracle Quest Connector.

-Abe

On Thu, Dec 4, 2014 at 10:49 AM, Dhandapani, Karthik <Karthik.Dhandapani@cvscaremark.com<mailto:Karthik.Dhandapani@cvscaremark.com>>
wrote:
Hi,

The Sqoop script failed with Oracle Oraoop Connector when there is no data in the source table
with the below error message.

Error
14/12/04 13:46:55 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException:
The table XXXXXX_LOG does not contain any data.
java.lang.RuntimeException: The table XXXXXX_LOG does not contain any data.

With “Oracle quest Connector Disabled” -Doraoop.disabled=true, the sqoop script succeeded
with 0 records.

Is there a way to avoid the script from failing when there is no data with Oracle quest connector
?

Thanks,
Karthik


Mime
View raw message