Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Sqoop >> mail # user >> Importing from OracleDB


+
James Hogarth 2013-02-01, 13:37
+
Jarek Jarcec Cecho 2013-02-01, 17:26
+
James Hogarth 2013-02-01, 18:14
Copy link to this message
-
Re: Importing from OracleDB
Hi James,
I'm glad to hear that you found reasonable workaround! If you think that supporting synonyms make sense, please do not hesitate and open new JIRA [1] for that.

Jarcec

Links:
1: https://issues.apache.org/jira/browse/SQOOP

On Fri, Feb 01, 2013 at 06:14:21PM +0000, James Hogarth wrote:
> On 1 Feb 2013 17:27, "Jarek Jarcec Cecho" <[EMAIL PROTECTED]> wrote:
> >
> > Hi James,
> > I'm afraid that using synonyms is not supported by Oracle driver. The
> problem is that Oracle driver is issuing following query to get columns for
> imported table:
> >
> >   SELECT COLUMN_NAME FROM ALL_TAB_COLUMNS WHERE OWNER = ? AND TABLE_NAME
> = ? ORDER BY COLUMN_ID
> >
> > This query returns no rows for synonym and thus import fails.
> >
> > As a workaround I would recommend to try out Generic JDBC Connector that
> is not using this query to fetch table metadata. You can force Sqoop to use
> Generic JDBC Connector by passing "--driver" parameter with value
> oracle.jdbc.OracleDriver, e.g.
> >
> >   sqoop import --connect ... --driver oracle.jdbc.OracleDriver
> >
> > Another solution that might possibly help you is to install OraOop
> connector, but I'm not sure whether it supports synonyms or not.
> >
> > Jarcec
> >
>
> Hi Jarcec
>
> Thanks for confirming that.
>
> In the end my workaround with specifying the columns capitalised ended up
> working nicely and isn't so bad seeing as I needed to cast the oracle type
> 'number' to Long/BIGINT on a couple of the columns anyway...
>
> Cheers
>
> James
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB