You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by Jean-Claude Cote <jc...@gmail.com> on 2019/01/07 20:43:51 UTC

Re: Oracle JDBC storage plugin

I have made some fixes to the JDBC storage plugin in order to make it work
with an Oracle database. I can now obtain the table names. As stated in my
previous email the JDBC API is not properly used in the case of an Oracle
engine.

I'm now able to obtain the table names but I don't really understand how to
construct the internal objects drill uses to keep track of the schemas and
tables. Should I report this as a bug?

Thank you
jc


On Wed, Dec 19, 2018 at 9:50 AM Jean-Claude Cote <jc...@gmail.com> wrote:

> I've configured drill to use an JDBC storage plugin. My connection string
> is for an Oracle database. I have included the Oracle JDBC driver to my
> drill deployment.
>
> The connection is established correctly. However the storage plugin fails
> to retrieve the schema of the database.
>
> The JDBC API provides two ways to get metadata about the database:
> getSchemas() and getCatalogs(). Depending on the database vendor one of
> those calls will return the information. The storage plugin correctly tries
> both calls. However I believe there is an issue when using Oracle.
>
> The JDBC API claims that getSchemas() returns a set of two columns "table
> schema" and "table catalog" but in reality it just returns "table schema"
> as a first column of the result set. I believe this to be a bug. Has anyone
> tested the JDBC storage plugin against an Oracle DB and successfully
> retrieved the list of schema and tables?
>
> This article explains in details the issue in retrieving schema
> information using JDBC.
> https://www.wisdomjobs.com/e-university/jdbc-tutorial-278/what-are-catalogs-and-schemas-1147.html
>
> Thank you
> jc
>
>

Re: Oracle JDBC storage plugin

Posted by Jean-Claude Cote <jc...@gmail.com>.
I did not fix the issue. I only confirmed that retrieving the tables will
not work with the current code. I've reported the issue
https://issues.apache.org/jira/browse/DRILL-6966

On Wed, Jan 9, 2019 at 1:34 AM Pritesh Maker <pm...@mapr.com> wrote:

> Hi jc
>
> Yes, please do open a bug and link the PR for the fix you have made.
>
> Thanks,
> Pritesh
>
> On Mon, Jan 7, 2019 at 12:44 PM Jean-Claude Cote <jc...@gmail.com> wrote:
>
> > I have made some fixes to the JDBC storage plugin in order to make it
> work
> > with an Oracle database. I can now obtain the table names. As stated in
> my
> > previous email the JDBC API is not properly used in the case of an Oracle
> > engine.
> >
> > I'm now able to obtain the table names but I don't really understand how
> to
> > construct the internal objects drill uses to keep track of the schemas
> and
> > tables. Should I report this as a bug?
> >
> > Thank you
> > jc
> >
> >
> > On Wed, Dec 19, 2018 at 9:50 AM Jean-Claude Cote <jc...@gmail.com>
> wrote:
> >
> > > I've configured drill to use an JDBC storage plugin. My connection
> string
> > > is for an Oracle database. I have included the Oracle JDBC driver to my
> > > drill deployment.
> > >
> > > The connection is established correctly. However the storage plugin
> fails
> > > to retrieve the schema of the database.
> > >
> > > The JDBC API provides two ways to get metadata about the database:
> > > getSchemas() and getCatalogs(). Depending on the database vendor one of
> > > those calls will return the information. The storage plugin correctly
> > tries
> > > both calls. However I believe there is an issue when using Oracle.
> > >
> > > The JDBC API claims that getSchemas() returns a set of two columns
> "table
> > > schema" and "table catalog" but in reality it just returns "table
> schema"
> > > as a first column of the result set. I believe this to be a bug. Has
> > anyone
> > > tested the JDBC storage plugin against an Oracle DB and successfully
> > > retrieved the list of schema and tables?
> > >
> > > This article explains in details the issue in retrieving schema
> > > information using JDBC.
> > >
> >
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.wisdomjobs.com_e-2Duniversity_jdbc-2Dtutorial-2D278_what-2Dare-2Dcatalogs-2Dand-2Dschemas-2D1147.html&d=DwIBaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=zySISmkmM4WNViCKijENtQ&m=YfAnItntskoeY0QCeFCPg_I5TGvVxmKJxZPyPlapbBc&s=voRA39kCWsJ9C_12gZPI_PrSspTsWgWT8-9EhpkXDmQ&e=
> > >
> > > Thank you
> > > jc
> > >
> > >
> >
>

Re: Oracle JDBC storage plugin

Posted by Pritesh Maker <pm...@mapr.com>.
Hi jc

Yes, please do open a bug and link the PR for the fix you have made.

Thanks,
Pritesh

On Mon, Jan 7, 2019 at 12:44 PM Jean-Claude Cote <jc...@gmail.com> wrote:

> I have made some fixes to the JDBC storage plugin in order to make it work
> with an Oracle database. I can now obtain the table names. As stated in my
> previous email the JDBC API is not properly used in the case of an Oracle
> engine.
>
> I'm now able to obtain the table names but I don't really understand how to
> construct the internal objects drill uses to keep track of the schemas and
> tables. Should I report this as a bug?
>
> Thank you
> jc
>
>
> On Wed, Dec 19, 2018 at 9:50 AM Jean-Claude Cote <jc...@gmail.com> wrote:
>
> > I've configured drill to use an JDBC storage plugin. My connection string
> > is for an Oracle database. I have included the Oracle JDBC driver to my
> > drill deployment.
> >
> > The connection is established correctly. However the storage plugin fails
> > to retrieve the schema of the database.
> >
> > The JDBC API provides two ways to get metadata about the database:
> > getSchemas() and getCatalogs(). Depending on the database vendor one of
> > those calls will return the information. The storage plugin correctly
> tries
> > both calls. However I believe there is an issue when using Oracle.
> >
> > The JDBC API claims that getSchemas() returns a set of two columns "table
> > schema" and "table catalog" but in reality it just returns "table schema"
> > as a first column of the result set. I believe this to be a bug. Has
> anyone
> > tested the JDBC storage plugin against an Oracle DB and successfully
> > retrieved the list of schema and tables?
> >
> > This article explains in details the issue in retrieving schema
> > information using JDBC.
> >
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.wisdomjobs.com_e-2Duniversity_jdbc-2Dtutorial-2D278_what-2Dare-2Dcatalogs-2Dand-2Dschemas-2D1147.html&d=DwIBaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=zySISmkmM4WNViCKijENtQ&m=YfAnItntskoeY0QCeFCPg_I5TGvVxmKJxZPyPlapbBc&s=voRA39kCWsJ9C_12gZPI_PrSspTsWgWT8-9EhpkXDmQ&e=
> >
> > Thank you
> > jc
> >
> >
>