James Hogarth 2013-02-01, 13:37
Jarek Jarcec Cecho 2013-02-01, 17:26
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
> 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
> 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.
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...
Jarek Jarcec Cecho 2013-02-01, 18:52