You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by "Ulf Andreasson @ MapR" <ua...@maprtech.com> on 2015/11/04 13:53:32 UTC

SHOW TABLES w/ MySQL storage plugin doesn't work ?

All,

I have a small mysql test system where I got some simple mysql tables.
Adding Drill to the mix I can see and use my MySQLDB and the db I specify
but I dont seem to be able to show tables ? This is true for all dbs/tables
in mysql as to my understanding !?

[root@e1node01 uffe]# /opt/drill/bin/drill-conf -n admin -p admin
apache drill 1.3.0-SNAPSHOT
"got drill?"
0: jdbc:drill:> SHOW DATABSES;
+---------------------+
|     SCHEMA_NAME     |
+---------------------+
| INFORMATION_SCHEMA  |
| MySQLDB             |
| cp.default          |
| dfs.default         |
| dfs.root            |
| dfs.tmp             |
| sys                 |
+---------------------+
7 rows selected (0.18 seconds)
0: jdbc:drill:> USE MySQLDB;
+-------+--------------------------------------+
|  ok   |               summary                |
+-------+--------------------------------------+
| true  | Default schema changed to [MySQLDB]  |
+-------+--------------------------------------+
1 row selected (0.104 seconds)
0: jdbc:drill:> SHOW TABLES;
+--+
|  |
+--+
+--+
No rows selected (0.14 seconds)
0: jdbc:drill:> SELECT * FROM MySQLDB.uffe.`employee`;
+------+---------+--------+---------+
|  id  |  name   |  dept  | salary  |
+------+---------+--------+---------+
| 100  | Thomas  | Sales  | 5000    |
+------+---------+--------+---------+
1 row selected (0.144 seconds)

If I check the info.schema I can see they are there

0: jdbc:drill:> SELECT table_name FROM MySQLDB.information_schema.`tables`
WHERE table_schema='uffe';
+-------------+
| table_name  |
+-------------+
| employee    |
| employee2   |
+-------------+
2 rows selected (0.148 seconds)

The storage plugin is defined as

{
  "type": "jdbc",
  "driver": "com.mysql.jdbc.Driver",
  "url": "jdbc:mysql://e1node03:3306/",
  "username": "ulf",
  "password": "mapr",
  "enabled": true
}

Any ideas to why I cant use "SHOW TABLES" ?

reg//ulf

--------
Ulf Andreasson | Ericsson Global Alliance Solution Engineer, MapR.com | +46
72 700 2295

Re: SHOW TABLES w/ MySQL storage plugin doesn't work ?

Posted by "Ulf Andreasson @ MapR" <ua...@maprtech.com>.
Much better! Thanks ... now I even see the full schema when doing the show
:-)

0: jdbc:drill:> SHOW DATABASES;
+-----------------------------+
|         SCHEMA_NAME         |
+-----------------------------+
| INFORMATION_SCHEMA          |
| MySQLDB.hive                |
| MySQLDB.hue                 |
| MySQLDB.information_schema  |
| MySQLDB.metrics             |
| MySQLDB.mysql               |
| MySQLDB.oozie               |
| MySQLDB.test                |
| MySQLDB.uffe                |
| MySQLDB                     |
| cp.default                  |
| dfs.default                 |
| dfs.root                    |
| dfs.tmp                     |
| sys                         |
+-----------------------------+
15 rows selected (0.181 seconds)
0: jdbc:drill:> USE MySQLDB.uffe;
+-------+-------------------------------------------+
|  ok   |                  summary                  |
+-------+-------------------------------------------+
| true  | Default schema changed to [MySQLDB.uffe]  |
+-------+-------------------------------------------+
1 row selected (0.135 seconds)
0: jdbc:drill:> SHOW TABLES;
+---------------+-------------+
| TABLE_SCHEMA  | TABLE_NAME  |
+---------------+-------------+
| MySQLDB.uffe  | employee    |
| MySQLDB.uffe  | employee2   |
+---------------+-------------+
2 rows selected (0.249 seconds)
0: jdbc:drill:> describe employee;
+--------------+--------------------+--------------+
| COLUMN_NAME  |     DATA_TYPE      | IS_NULLABLE  |
+--------------+--------------------+--------------+
| id           | INTEGER            | NO           |
| name         | CHARACTER VARYING  | YES          |
| dept         | CHARACTER VARYING  | YES          |
| salary       | INTEGER            | YES          |
+--------------+--------------------+--------------+
4 rows selected (0.229 seconds)
0: jdbc:drill:> select * from employee;
+------+---------+--------+---------+
|  id  |  name   |  dept  | salary  |
+------+---------+--------+---------+
| 100  | Thomas  | Sales  | 5000    |
+------+---------+--------+---------+
1 row selected (0.24 seconds)

reg//ulf



--------
Ulf Andreasson | Ericsson Global Alliance Solution Engineer, MapR.com | +46
72 700 2295


On Wed, Nov 4, 2015 at 6:04 PM, Jacques Nadeau <ja...@dremio.com> wrote:

> The two commits you want are:
>
> 22e5316: DRILL-3992: Add/fix support for JDBC schemas (tested against
> oracle and derby)
> 2f894af: DRILL-3956: Add support for MySQL text type
>
>
> Those are both newer than your commit.
>
>
>
> --
> Jacques Nadeau
> CTO and Co-Founder, Dremio
>
> On Wed, Nov 4, 2015 at 8:59 AM, Ulf Andreasson @ MapR <
> uandreasson@maprtech.com> wrote:
>
> > Ah ok ... sorry .... types faster than reads :(
> >
> >
> > --------
> > Ulf Andreasson | Ericsson Global Alliance Solution Engineer, MapR.com |
> +46
> > 72 700 2295
> >
> >
> > On Wed, Nov 4, 2015 at 5:59 PM, Ulf Andreasson @ MapR <
> > uandreasson@maprtech.com> wrote:
> >
> > > This was cloned on Oct 31st, id
> e4b94a78487f844be4fe71c4b9bf88b16c7f42f7
> > >
> > > reg//ulf
> > >
> > > --------
> > > Ulf Andreasson | Ericsson Global Alliance Solution Engineer, MapR.com |
> > +46
> > > 72 700 2295
> > >
> > >
> >
>

Re: SHOW TABLES w/ MySQL storage plugin doesn't work ?

Posted by Jacques Nadeau <ja...@dremio.com>.
The two commits you want are:

22e5316: DRILL-3992: Add/fix support for JDBC schemas (tested against
oracle and derby)
2f894af: DRILL-3956: Add support for MySQL text type


Those are both newer than your commit.



--
Jacques Nadeau
CTO and Co-Founder, Dremio

On Wed, Nov 4, 2015 at 8:59 AM, Ulf Andreasson @ MapR <
uandreasson@maprtech.com> wrote:

> Ah ok ... sorry .... types faster than reads :(
>
>
> --------
> Ulf Andreasson | Ericsson Global Alliance Solution Engineer, MapR.com | +46
> 72 700 2295
>
>
> On Wed, Nov 4, 2015 at 5:59 PM, Ulf Andreasson @ MapR <
> uandreasson@maprtech.com> wrote:
>
> > This was cloned on Oct 31st, id e4b94a78487f844be4fe71c4b9bf88b16c7f42f7
> >
> > reg//ulf
> >
> > --------
> > Ulf Andreasson | Ericsson Global Alliance Solution Engineer, MapR.com |
> +46
> > 72 700 2295
> >
> >
>

Re: SHOW TABLES w/ MySQL storage plugin doesn't work ?

Posted by "Ulf Andreasson @ MapR" <ua...@maprtech.com>.
Ah ok ... sorry .... types faster than reads :(


--------
Ulf Andreasson | Ericsson Global Alliance Solution Engineer, MapR.com | +46
72 700 2295


On Wed, Nov 4, 2015 at 5:59 PM, Ulf Andreasson @ MapR <
uandreasson@maprtech.com> wrote:

> This was cloned on Oct 31st, id e4b94a78487f844be4fe71c4b9bf88b16c7f42f7
>
> reg//ulf
>
> --------
> Ulf Andreasson | Ericsson Global Alliance Solution Engineer, MapR.com | +46
> 72 700 2295
>
>

Re: SHOW TABLES w/ MySQL storage plugin doesn't work ?

Posted by "Ulf Andreasson @ MapR" <ua...@maprtech.com>.
This was cloned on Oct 31st, id e4b94a78487f844be4fe71c4b9bf88b16c7f42f7

reg//ulf

--------
Ulf Andreasson | Ericsson Global Alliance Solution Engineer, MapR.com | +46
72 700 2295

Re: SHOW TABLES w/ MySQL storage plugin doesn't work ?

Posted by Jacques Nadeau <ja...@dremio.com>.
There were some issues with this in 1.2. I believe they have been resolved
in the latest master if you want to try that out. We'll be rolling a 1.3
release shortly with these fixes.

--
Jacques Nadeau
CTO and Co-Founder, Dremio

On Wed, Nov 4, 2015 at 4:53 AM, Ulf Andreasson @ MapR <
uandreasson@maprtech.com> wrote:

> All,
>
> I have a small mysql test system where I got some simple mysql tables.
> Adding Drill to the mix I can see and use my MySQLDB and the db I specify
> but I dont seem to be able to show tables ? This is true for all dbs/tables
> in mysql as to my understanding !?
>
> [root@e1node01 uffe]# /opt/drill/bin/drill-conf -n admin -p admin
> apache drill 1.3.0-SNAPSHOT
> "got drill?"
> 0: jdbc:drill:> SHOW DATABSES;
> +---------------------+
> |     SCHEMA_NAME     |
> +---------------------+
> | INFORMATION_SCHEMA  |
> | MySQLDB             |
> | cp.default          |
> | dfs.default         |
> | dfs.root            |
> | dfs.tmp             |
> | sys                 |
> +---------------------+
> 7 rows selected (0.18 seconds)
> 0: jdbc:drill:> USE MySQLDB;
> +-------+--------------------------------------+
> |  ok   |               summary                |
> +-------+--------------------------------------+
> | true  | Default schema changed to [MySQLDB]  |
> +-------+--------------------------------------+
> 1 row selected (0.104 seconds)
> 0: jdbc:drill:> SHOW TABLES;
> +--+
> |  |
> +--+
> +--+
> No rows selected (0.14 seconds)
> 0: jdbc:drill:> SELECT * FROM MySQLDB.uffe.`employee`;
> +------+---------+--------+---------+
> |  id  |  name   |  dept  | salary  |
> +------+---------+--------+---------+
> | 100  | Thomas  | Sales  | 5000    |
> +------+---------+--------+---------+
> 1 row selected (0.144 seconds)
>
> If I check the info.schema I can see they are there
>
> 0: jdbc:drill:> SELECT table_name FROM MySQLDB.information_schema.`tables`
> WHERE table_schema='uffe';
> +-------------+
> | table_name  |
> +-------------+
> | employee    |
> | employee2   |
> +-------------+
> 2 rows selected (0.148 seconds)
>
> The storage plugin is defined as
>
> {
>   "type": "jdbc",
>   "driver": "com.mysql.jdbc.Driver",
>   "url": "jdbc:mysql://e1node03:3306/",
>   "username": "ulf",
>   "password": "mapr",
>   "enabled": true
> }
>
> Any ideas to why I cant use "SHOW TABLES" ?
>
> reg//ulf
>
> --------
> Ulf Andreasson | Ericsson Global Alliance Solution Engineer, MapR.com | +46
> 72 700 2295
>