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 Threaded View
Sqoop >> mail # user >> Importing from OracleDB


Copy link to this message
-
Re: Importing from OracleDB
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