-Re: Importing from OracleDB
Jarek Jarcec Cecho 2013-02-01, 18:52
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  for that.
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...