Discussion:
Quoting queries
(too old to reply)
Lane David (ST-ESS/MKP3.2)
2017-03-30 07:57:29 UTC
Permalink
Raw Message
Hi all,

we are experimenting with Drill at the moment. Everything is working fine on the server and I can execute any queries I need there successfully. I followed the instructions on the following page to get it working from a client computer:
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/

This has also been successful and I can execute simple queries from Squirrel. However I get various parse errors when certain other patterns are used.

The following works:
select * from `a/b/c.json`;

The following doesn't:
select * from `a/*/c.json`;

Error: PARSE ERROR: Lexical error at line 1, column 44. Encountered: <EOF> after : "`a"

I tried the following:
select * from `a/\*/c.json`;
Error: VALIDATION ERROR: From line 1, column 33 to line 1, column 60: Table 'a/\*/c.json' not found
And various other combinations of \, /, ', etc.

I have tried Squirrel, SQL WB, Intellij

Anyone got this working?

Mit freundlichen Grüßen / Best regards

David Lane

Product Management Cloud-based Services (ST-ESS/MKP3.2)
Bosch Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY | boschbuildingsecurity.com<http://boschbuildingsecurity.com>
Tel. +49(89)6290-1674 | Fax +49(89)6290 | ***@de.bosch.com<mailto:***@de.bosch.com>

Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; Geschäftsführung: Gert van Iperen, Andreas Bartz, Thomas Quante, Bernhard Schuster
rahul challapalli
2017-03-30 16:26:25 UTC
Permalink
Raw Message
Hmm...strange. It works for me on drill 1.9.0 from the sqlline client. Can
you try running it from sqlline just so that we can eliminate other tools
trying to do some validation and failing?

0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/b/c.json`;

*+-----+*

*| **id ** |*

*+-----+*

*| *1 * |*

*+-----+*

1 row selected (0.209 seconds)

0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/*/c.json`;

*+-------+-----+*

*| **dir0 ** | **id ** |*

*+-------+-----+*

*| *b * | *1 * |*

*+-------+-----+*

1 row selected (0.233 seconds)

On Thu, Mar 30, 2017 at 12:57 AM, Lane David (ST-ESS/MKP3.2) <
Post by Lane David (ST-ESS/MKP3.2)
Hi all,
we are experimenting with Drill at the moment. Everything is working fine
on the server and I can execute any queries I need there successfully. I
followed the instructions on the following page to get it working from a
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
This has also been successful and I can execute simple queries from
Squirrel. However I get various parse errors when certain other patterns
are used.
select * from `a/b/c.json`;
select * from `a/*/c.json`;
Error: PARSE ERROR: Lexical error at line 1, column 44. Encountered: <EOF> after : "`a"
select * from `a/\*/c.json`;
Table 'a/\*/c.json' not found
And various other combinations of \, /, ', etc.
I have tried Squirrel, SQL WB, Intellij
Anyone got this working?
Mit freundlichen GrÌßen / Best regards
David Lane
Product Management Cloud-based Services (ST-ESS/MKP3.2)
Bosch Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY
| boschbuildingsecurity.com<http://boschbuildingsecurity.com>
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; GeschÀftsfÌhrung: Gert van
Iperen, Andreas Bartz, Thomas Quante, Bernhard Schuster
Kunal Khatua
2017-03-30 18:03:53 UTC
Permalink
Raw Message
What is the client machine from where you're issuing the query? Is it Windows?

Drill 1.10 has a fix for Windows wildcard: https://issues.apache.org/jira/browse/DRILL-4812

Can you try with that?


Kunal Khatua

Engineering

[1490734684477_mapr.png]

www.mapr.com<http://www.mapr.com/>

________________________________
From: rahul challapalli <***@gmail.com>
Sent: Thursday, March 30, 2017 9:26:25 AM
To: user
Subject: Re: Quoting queries

Hmm...strange. It works for me on drill 1.9.0 from the sqlline client. Can
you try running it from sqlline just so that we can eliminate other tools
trying to do some validation and failing?

0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/b/c.json`;

*+-----+*

*| **id ** |*

*+-----+*

*| *1 * |*

*+-----+*

1 row selected (0.209 seconds)

0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/*/c.json`;

*+-------+-----+*

*| **dir0 ** | **id ** |*

*+-------+-----+*

*| *b * | *1 * |*

*+-------+-----+*

1 row selected (0.233 seconds)

On Thu, Mar 30, 2017 at 12:57 AM, Lane David (ST-ESS/MKP3.2) <
Post by Lane David (ST-ESS/MKP3.2)
Hi all,
we are experimenting with Drill at the moment. Everything is working fine
on the server and I can execute any queries I need there successfully. I
followed the instructions on the following page to get it working from a
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
This has also been successful and I can execute simple queries from
Squirrel. However I get various parse errors when certain other patterns
are used.
select * from `a/b/c.json`;
select * from `a/*/c.json`;
<EOF> after : "`a"
select * from `a/\*/c.json`;
Table 'a/\*/c.json' not found
And various other combinations of \, /, ', etc.
I have tried Squirrel, SQL WB, Intellij
Anyone got this working?
Mit freundlichen Grüßen / Best regards
David Lane
Product Management Cloud-based Services (ST-ESS/MKP3.2)
Bosch Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY
| boschbuildingsecurity.com<http://boschbuildingsecurity.com>
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; Geschäftsführung: Gert van
Iperen, Andreas Bartz, Thomas Quante, Bernhard Schuster
Lane David (ST-ESS/MKP3.2)
2017-03-31 07:44:39 UTC
Permalink
Raw Message
HI Kunal,

thanks for the reply: yes the client machine is windows, the server is linux. I'll try out 1.10



-----Ursprüngliche Nachricht-----
Von: Kunal Khatua [mailto:***@mapr.com]
Gesendet: Donnerstag, 30. März 2017 20:04
An: user <***@drill.apache.org>
Betreff: Re: Quoting queries

What is the client machine from where you're issuing the query? Is it Windows?

Drill 1.10 has a fix for Windows wildcard: https://issues.apache.org/jira/browse/DRILL-4812

Can you try with that?


Kunal Khatua

Engineering

[1490734684477_mapr.png]

www.mapr.com<http://www.mapr.com/>

________________________________
From: rahul challapalli <***@gmail.com>
Sent: Thursday, March 30, 2017 9:26:25 AM
To: user
Subject: Re: Quoting queries

Hmm...strange. It works for me on drill 1.9.0 from the sqlline client. Can you try running it from sqlline just so that we can eliminate other tools trying to do some validation and failing?

0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/b/c.json`;

*+-----+*

*| **id ** |*

*+-----+*

*| *1 * |*

*+-----+*

1 row selected (0.209 seconds)

0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/*/c.json`;

*+-------+-----+*

*| **dir0 ** | **id ** |*

*+-------+-----+*

*| *b * | *1 * |*

*+-------+-----+*

1 row selected (0.233 seconds)
Post by Lane David (ST-ESS/MKP3.2)
Hi all,
we are experimenting with Drill at the moment. Everything is working
fine on the server and I can execute any queries I need there
successfully. I followed the instructions on the following page to get
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
This has also been successful and I can execute simple queries from
Squirrel. However I get various parse errors when certain other
patterns are used.
select * from `a/b/c.json`;
select * from `a/*/c.json`;
<EOF> after : "`a"
select * from `a/\*/c.json`;
Table 'a/\*/c.json' not found
And various other combinations of \, /, ', etc.
I have tried Squirrel, SQL WB, Intellij
Anyone got this working?
Mit freundlichen Grüßen / Best regards
David Lane
Product Management Cloud-based Services (ST-ESS/MKP3.2) Bosch
Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY
| boschbuildingsecurity.com<http://boschbuildingsecurity.com>
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; Geschäftsführung: Gert van
Iperen, Andreas Bartz, Thomas Quante, Bernhard Schuster
Lane David (ST-ESS/MKP3.2)
2017-03-31 10:50:57 UTC
Permalink
Raw Message
BTW I tried with the 1.10 version on both sides (server and client) and I still get the same error.

-----Ursprüngliche Nachricht-----
Von: Kunal Khatua [mailto:***@mapr.com]
Gesendet: Donnerstag, 30. März 2017 20:04
An: user <***@drill.apache.org>
Betreff: Re: Quoting queries

What is the client machine from where you're issuing the query? Is it Windows?

Drill 1.10 has a fix for Windows wildcard: https://issues.apache.org/jira/browse/DRILL-4812

Can you try with that?


Kunal Khatua

Engineering

[1490734684477_mapr.png]

www.mapr.com<http://www.mapr.com/>

________________________________
From: rahul challapalli <***@gmail.com>
Sent: Thursday, March 30, 2017 9:26:25 AM
To: user
Subject: Re: Quoting queries

Hmm...strange. It works for me on drill 1.9.0 from the sqlline client. Can you try running it from sqlline just so that we can eliminate other tools trying to do some validation and failing?

0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/b/c.json`;

*+-----+*

*| **id ** |*

*+-----+*

*| *1 * |*

*+-----+*

1 row selected (0.209 seconds)

0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/*/c.json`;

*+-------+-----+*

*| **dir0 ** | **id ** |*

*+-------+-----+*

*| *b * | *1 * |*

*+-------+-----+*

1 row selected (0.233 seconds)
Post by Lane David (ST-ESS/MKP3.2)
Hi all,
we are experimenting with Drill at the moment. Everything is working
fine on the server and I can execute any queries I need there
successfully. I followed the instructions on the following page to get
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
This has also been successful and I can execute simple queries from
Squirrel. However I get various parse errors when certain other
patterns are used.
select * from `a/b/c.json`;
select * from `a/*/c.json`;
<EOF> after : "`a"
select * from `a/\*/c.json`;
Table 'a/\*/c.json' not found
And various other combinations of \, /, ', etc.
I have tried Squirrel, SQL WB, Intellij
Anyone got this working?
Mit freundlichen Grüßen / Best regards
David Lane
Product Management Cloud-based Services (ST-ESS/MKP3.2) Bosch
Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY
| boschbuildingsecurity.com<http://boschbuildingsecurity.com>
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; Geschäftsführung: Gert van
Iperen, Andreas Bartz, Thomas Quante, Bernhard Schuster
Kunal Khatua
2017-03-31 18:58:56 UTC
Permalink
Raw Message
This seems to be a windows JDBC client specific problem.

Using SQuirreL, I tried with this on Windows while accessing a Linux server:

select * from `nation_json/a/1/*/nation.json`;
Error: PARSE ERROR: Lexical error at line 1, column 31. Encountered: <EOF> after : "`nation_json/a/1"
SQL Query select * from `nation_json/a/1
^
[Error Id: f67bb648-8ef2-418e-a53c-e8a835a4e3f9 on pssc-65.qa.lab:31010]
SQLState: null
ErrorCode: 0


The server profiles listing: http://<hostname>:8047/profiles/
Is showing that the query submitted was
select * from `nation_json/a/1

This works from Sqlline (Linux client) when connecting to the Linux Drillbit.

Please log a bug for this.

Thanks

-----Original Message-----
From: Lane David (ST-ESS/MKP3.2) [mailto:***@de.bosch.com]
Sent: Friday, March 31, 2017 3:51 AM
To: ***@drill.apache.org
Subject: AW: Quoting queries

BTW I tried with the 1.10 version on both sides (server and client) and I still get the same error.

-----Ursprüngliche Nachricht-----
Von: Kunal Khatua [mailto:***@mapr.com]
Gesendet: Donnerstag, 30. März 2017 20:04
An: user <***@drill.apache.org>
Betreff: Re: Quoting queries

What is the client machine from where you're issuing the query? Is it Windows?

Drill 1.10 has a fix for Windows wildcard: https://issues.apache.org/jira/browse/DRILL-4812

Can you try with that?


Kunal Khatua

Engineering

[1490734684477_mapr.png]

www.mapr.com<http://www.mapr.com/>

________________________________
From: rahul challapalli <***@gmail.com>
Sent: Thursday, March 30, 2017 9:26:25 AM
To: user
Subject: Re: Quoting queries

Hmm...strange. It works for me on drill 1.9.0 from the sqlline client. Can you try running it from sqlline just so that we can eliminate other tools trying to do some validation and failing?

0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/b/c.json`;

*+-----+*

*| **id ** |*

*+-----+*

*| *1 * |*

*+-----+*

1 row selected (0.209 seconds)

0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/*/c.json`;

*+-------+-----+*

*| **dir0 ** | **id ** |*

*+-------+-----+*

*| *b * | *1 * |*

*+-------+-----+*

1 row selected (0.233 seconds)
Post by Lane David (ST-ESS/MKP3.2)
Hi all,
we are experimenting with Drill at the moment. Everything is working
fine on the server and I can execute any queries I need there
successfully. I followed the instructions on the following page to get
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
This has also been successful and I can execute simple queries from
Squirrel. However I get various parse errors when certain other
patterns are used.
select * from `a/b/c.json`;
select * from `a/*/c.json`;
<EOF> after : "`a"
select * from `a/\*/c.json`;
Table 'a/\*/c.json' not found
And various other combinations of \, /, ', etc.
I have tried Squirrel, SQL WB, Intellij
Anyone got this working?
Mit freundlichen Grüßen / Best regards
David Lane
Product Management Cloud-based Services (ST-ESS/MKP3.2) Bosch
Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY
| boschbuildingsecurity.com<http://boschbuildingsecurity.com>
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; Geschäftsführung: Gert van
Iperen, Andreas Bartz, Thomas Quante, Bernhard Schuster
Kunal Khatua
2017-03-31 21:29:58 UTC
Permalink
Raw Message
I take that back. The issue looks more likely related to SQuirreL. It seems to be truncating anything after the '*' when submitting the query.


I tried with a standalone JDBC program on Windows and it succeeded in submitting the full query and getting back the results from a remote Linux Drillbit in distributed mode.


So, looks like a SQuirreL problem.


Can you try with a standalone program and the Drill 1.10 JDBC driver (drill-jdbc-all-1.10.0*.jar) just to confirm that the issue is indeed in the JDBC driver and not the SQuirreL application?



________________________________
From: Kunal Khatua <***@mapr.com>
Sent: Friday, March 31, 2017 11:58:56 AM
To: ***@drill.apache.org
Subject: RE: Quoting queries

This seems to be a windows JDBC client specific problem.

Using SQuirreL, I tried with this on Windows while accessing a Linux server:

select * from `nation_json/a/1/*/nation.json`;
Error: PARSE ERROR: Lexical error at line 1, column 31. Encountered: <EOF> after : "`nation_json/a/1"
SQL Query select * from `nation_json/a/1
^
[Error Id: f67bb648-8ef2-418e-a53c-e8a835a4e3f9 on pssc-65.qa.lab:31010]
SQLState: null
ErrorCode: 0


The server profiles listing: http://<hostname>:8047/profiles/
Is showing that the query submitted was
select * from `nation_json/a/1

This works from Sqlline (Linux client) when connecting to the Linux Drillbit.

Please log a bug for this.

Thanks

-----Original Message-----
From: Lane David (ST-ESS/MKP3.2) [mailto:***@de.bosch.com]
Sent: Friday, March 31, 2017 3:51 AM
To: ***@drill.apache.org
Subject: AW: Quoting queries

BTW I tried with the 1.10 version on both sides (server and client) and I still get the same error.

-----Ursprüngliche Nachricht-----
Von: Kunal Khatua [mailto:***@mapr.com]
Gesendet: Donnerstag, 30. März 2017 20:04
An: user <***@drill.apache.org>
Betreff: Re: Quoting queries

What is the client machine from where you're issuing the query? Is it Windows?

Drill 1.10 has a fix for Windows wildcard: https://issues.apache.org/jira/browse/DRILL-4812

Can you try with that?


Kunal Khatua

Engineering

[1490734684477_mapr.png]

www.mapr.com<http://www.mapr.com/>

________________________________
From: rahul challapalli <***@gmail.com>
Sent: Thursday, March 30, 2017 9:26:25 AM
To: user
Subject: Re: Quoting queries

Hmm...strange. It works for me on drill 1.9.0 from the sqlline client. Can you try running it from sqlline just so that we can eliminate other tools trying to do some validation and failing?

0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/b/c.json`;

*+-----+*

*| **id ** |*

*+-----+*

*| *1 * |*

*+-----+*

1 row selected (0.209 seconds)

0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/*/c.json`;

*+-------+-----+*

*| **dir0 ** | **id ** |*

*+-------+-----+*

*| *b * | *1 * |*

*+-------+-----+*

1 row selected (0.233 seconds)
Post by Lane David (ST-ESS/MKP3.2)
Hi all,
we are experimenting with Drill at the moment. Everything is working
fine on the server and I can execute any queries I need there
successfully. I followed the instructions on the following page to get
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
This has also been successful and I can execute simple queries from
Squirrel. However I get various parse errors when certain other
patterns are used.
select * from `a/b/c.json`;
select * from `a/*/c.json`;
<EOF> after : "`a"
select * from `a/\*/c.json`;
Table 'a/\*/c.json' not found
And various other combinations of \, /, ', etc.
I have tried Squirrel, SQL WB, Intellij
Anyone got this working?
Mit freundlichen Grüßen / Best regards
David Lane
Product Management Cloud-based Services (ST-ESS/MKP3.2) Bosch
Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY
| boschbuildingsecurity.com<http://boschbuildingsecurity.com>
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; Geschäftsführung: Gert van
Iperen, Andreas Bartz, Thomas Quante, Bernhard Schuster
Lane David (ST-ESS/MKP3.2)
2017-04-04 07:27:23 UTC
Permalink
Raw Message
I don't have time to write a test program but I can confirm that the exact same problem with the same error message happens in Squirrel, SqlWorkbench (http://www.sql-workbench.net/) and intellij, so I'm pretty sure it's a JDBC driver problem.

Mit freundlichen Grüßen / Best regards

David Lane

Product Management Cloud-based Services (ST-ESS/MKP3.2)
Bosch Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY | boschbuildingsecurity.com
Tel. +49(89)6290-1674 | Fax +49(89)6290 | ***@de.bosch.com

Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; Geschäftsführung: Gert van Iperen, Andreas Bartz, Thomas Quante, Bernhard Schuster



-----Ursprüngliche Nachricht-----
Von: Kunal Khatua [mailto:***@mapr.com]
Gesendet: Freitag, 31. März 2017 23:30
An: ***@drill.apache.org
Betreff: Re: Quoting queries

I take that back. The issue looks more likely related to SQuirreL. It seems to be truncating anything after the '*' when submitting the query.


I tried with a standalone JDBC program on Windows and it succeeded in submitting the full query and getting back the results from a remote Linux Drillbit in distributed mode.


So, looks like a SQuirreL problem.


Can you try with a standalone program and the Drill 1.10 JDBC driver (drill-jdbc-all-1.10.0*.jar) just to confirm that the issue is indeed in the JDBC driver and not the SQuirreL application?



________________________________
From: Kunal Khatua <***@mapr.com>
Sent: Friday, March 31, 2017 11:58:56 AM
To: ***@drill.apache.org
Subject: RE: Quoting queries

This seems to be a windows JDBC client specific problem.

Using SQuirreL, I tried with this on Windows while accessing a Linux server:

select * from `nation_json/a/1/*/nation.json`;
Error: PARSE ERROR: Lexical error at line 1, column 31. Encountered: <EOF> after : "`nation_json/a/1"
SQL Query select * from `nation_json/a/1
^
[Error Id: f67bb648-8ef2-418e-a53c-e8a835a4e3f9 on pssc-65.qa.lab:31010]
SQLState: null
ErrorCode: 0


The server profiles listing: http://<hostname>:8047/profiles/ Is showing that the query submitted was select * from `nation_json/a/1

This works from Sqlline (Linux client) when connecting to the Linux Drillbit.

Please log a bug for this.

Thanks

-----Original Message-----
From: Lane David (ST-ESS/MKP3.2) [mailto:***@de.bosch.com]
Sent: Friday, March 31, 2017 3:51 AM
To: ***@drill.apache.org
Subject: AW: Quoting queries

BTW I tried with the 1.10 version on both sides (server and client) and I still get the same error.

-----Ursprüngliche Nachricht-----
Von: Kunal Khatua [mailto:***@mapr.com]
Gesendet: Donnerstag, 30. März 2017 20:04
An: user <***@drill.apache.org>
Betreff: Re: Quoting queries

What is the client machine from where you're issuing the query? Is it Windows?

Drill 1.10 has a fix for Windows wildcard: https://issues.apache.org/jira/browse/DRILL-4812

Can you try with that?


Kunal Khatua

Engineering

[1490734684477_mapr.png]

www.mapr.com<http://www.mapr.com/>

________________________________
From: rahul challapalli <***@gmail.com>
Sent: Thursday, March 30, 2017 9:26:25 AM
To: user
Subject: Re: Quoting queries

Hmm...strange. It works for me on drill 1.9.0 from the sqlline client. Can you try running it from sqlline just so that we can eliminate other tools trying to do some validation and failing?

0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/b/c.json`;

*+-----+*

*| **id ** |*

*+-----+*

*| *1 * |*

*+-----+*

1 row selected (0.209 seconds)

0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/*/c.json`;

*+-------+-----+*

*| **dir0 ** | **id ** |*

*+-------+-----+*

*| *b * | *1 * |*

*+-------+-----+*

1 row selected (0.233 seconds)
Post by Lane David (ST-ESS/MKP3.2)
Hi all,
we are experimenting with Drill at the moment. Everything is working
fine on the server and I can execute any queries I need there
successfully. I followed the instructions on the following page to get
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
This has also been successful and I can execute simple queries from
Squirrel. However I get various parse errors when certain other
patterns are used.
select * from `a/b/c.json`;
select * from `a/*/c.json`;
<EOF> after : "`a"
select * from `a/\*/c.json`;
Table 'a/\*/c.json' not found
And various other combinations of \, /, ', etc.
I have tried Squirrel, SQL WB, Intellij
Anyone got this working?
Mit freundlichen Grüßen / Best regards
David Lane
Product Management Cloud-based Services (ST-ESS/MKP3.2) Bosch
Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY
| boschbuildingsecurity.com<http://boschbuildingsecurity.com>
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; Geschäftsführung: Gert van
Iperen, Andreas Bartz, Thomas Quante, Bernhard Schuster
Lane David (ST-ESS/MKP3.2)
2017-04-26 07:29:50 UTC
Permalink
Raw Message
Hi all,

just to bump this, is there anything that can be done here? At the moment I am reduced to executing queries on the command line and scraping the data together afterwards which is partly very time consuming.

Mit freundlichen Grüßen / Best regards

David Lane

-----Ursprüngliche Nachricht-----
Von: Lane David (ST-ESS/MKP3.2) [mailto:***@de.bosch.com]
Gesendet: Dienstag, 4. April 2017 09:27
An: ***@drill.apache.org
Betreff: AW: Quoting queries

I don't have time to write a test program but I can confirm that the exact same problem with the same error message happens in Squirrel, SqlWorkbench (http://www.sql-workbench.net/) and intellij, so I'm pretty sure it's a JDBC driver problem.

Mit freundlichen Grüßen / Best regards

David Lane

Product Management Cloud-based Services (ST-ESS/MKP3.2) Bosch Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY | boschbuildingsecurity.com Tel. +49(89)6290-1674 | Fax +49(89)6290 | ***@de.bosch.com

Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; Geschäftsführung: Gert van Iperen, Andreas Bartz, Thomas Quante, Bernhard Schuster



-----Ursprüngliche Nachricht-----
Von: Kunal Khatua [mailto:***@mapr.com]
Gesendet: Freitag, 31. März 2017 23:30
An: ***@drill.apache.org
Betreff: Re: Quoting queries

I take that back. The issue looks more likely related to SQuirreL. It seems to be truncating anything after the '*' when submitting the query.


I tried with a standalone JDBC program on Windows and it succeeded in submitting the full query and getting back the results from a remote Linux Drillbit in distributed mode.


So, looks like a SQuirreL problem.


Can you try with a standalone program and the Drill 1.10 JDBC driver (drill-jdbc-all-1.10.0*.jar) just to confirm that the issue is indeed in the JDBC driver and not the SQuirreL application?



________________________________
From: Kunal Khatua <***@mapr.com>
Sent: Friday, March 31, 2017 11:58:56 AM
To: ***@drill.apache.org
Subject: RE: Quoting queries

This seems to be a windows JDBC client specific problem.

Using SQuirreL, I tried with this on Windows while accessing a Linux server:

select * from `nation_json/a/1/*/nation.json`;
Error: PARSE ERROR: Lexical error at line 1, column 31. Encountered: <EOF> after : "`nation_json/a/1"
SQL Query select * from `nation_json/a/1
^
[Error Id: f67bb648-8ef2-418e-a53c-e8a835a4e3f9 on pssc-65.qa.lab:31010]
SQLState: null
ErrorCode: 0


The server profiles listing: http://<hostname>:8047/profiles/ Is showing that the query submitted was select * from `nation_json/a/1

This works from Sqlline (Linux client) when connecting to the Linux Drillbit.

Please log a bug for this.

Thanks

-----Original Message-----
From: Lane David (ST-ESS/MKP3.2) [mailto:***@de.bosch.com]
Sent: Friday, March 31, 2017 3:51 AM
To: ***@drill.apache.org
Subject: AW: Quoting queries

BTW I tried with the 1.10 version on both sides (server and client) and I still get the same error.

-----Ursprüngliche Nachricht-----
Von: Kunal Khatua [mailto:***@mapr.com]
Gesendet: Donnerstag, 30. März 2017 20:04
An: user <***@drill.apache.org>
Betreff: Re: Quoting queries

What is the client machine from where you're issuing the query? Is it Windows?

Drill 1.10 has a fix for Windows wildcard: https://issues.apache.org/jira/browse/DRILL-4812

Can you try with that?


Kunal Khatua

Engineering

[1490734684477_mapr.png]

www.mapr.com<http://www.mapr.com/>

________________________________
From: rahul challapalli <***@gmail.com>
Sent: Thursday, March 30, 2017 9:26:25 AM
To: user
Subject: Re: Quoting queries

Hmm...strange. It works for me on drill 1.9.0 from the sqlline client. Can you try running it from sqlline just so that we can eliminate other tools trying to do some validation and failing?

0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/b/c.json`;

*+-----+*

*| **id ** |*

*+-----+*

*| *1 * |*

*+-----+*

1 row selected (0.209 seconds)

0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/*/c.json`;

*+-------+-----+*

*| **dir0 ** | **id ** |*

*+-------+-----+*

*| *b * | *1 * |*

*+-------+-----+*

1 row selected (0.233 seconds)
Post by Lane David (ST-ESS/MKP3.2)
Hi all,
we are experimenting with Drill at the moment. Everything is working
fine on the server and I can execute any queries I need there
successfully. I followed the instructions on the following page to get
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
This has also been successful and I can execute simple queries from
Squirrel. However I get various parse errors when certain other
patterns are used.
select * from `a/b/c.json`;
select * from `a/*/c.json`;
<EOF> after : "`a"
select * from `a/\*/c.json`;
Table 'a/\*/c.json' not found
And various other combinations of \, /, ', etc.
I have tried Squirrel, SQL WB, Intellij
Anyone got this working?
Mit freundlichen Grüßen / Best regards
David Lane
Product Management Cloud-based Services (ST-ESS/MKP3.2) Bosch
Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY
| boschbuildingsecurity.com<http://boschbuildingsecurity.com>
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; Geschäftsführung: Gert van
Iperen, Andreas Bartz, Thomas Quante, Bernhard Schuster
Ted Dunning
2017-04-26 21:59:20 UTC
Permalink
Raw Message
David,

Did the jdbc driver that Kunal recommended solve your problem?



On Wed, Apr 26, 2017 at 12:29 AM, Lane David (ST-ESS/MKP3.2) <
Post by Lane David (ST-ESS/MKP3.2)
Hi all,
just to bump this, is there anything that can be done here? At the moment
I am reduced to executing queries on the command line and scraping the data
together afterwards which is partly very time consuming.
Mit freundlichen GrÌßen / Best regards
David Lane
-----UrsprÃŒngliche Nachricht-----
Gesendet: Dienstag, 4. April 2017 09:27
Betreff: AW: Quoting queries
I don't have time to write a test program but I can confirm that the exact
same problem with the same error message happens in Squirrel, SqlWorkbench (
http://www.sql-workbench.net/) and intellij, so I'm pretty sure it's a
JDBC driver problem.
Mit freundlichen GrÌßen / Best regards
David Lane
Product Management Cloud-based Services (ST-ESS/MKP3.2) Bosch
Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY |
boschbuildingsecurity.com Tel. +49(89)6290-1674 | Fax +49(89)6290 |
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; GeschÀftsfÌhrung: Gert van
Iperen, Andreas Bartz, Thomas Quante, Bernhard Schuster
-----UrsprÃŒngliche Nachricht-----
Gesendet: Freitag, 31. MÀrz 2017 23:30
Betreff: Re: Quoting queries
I take that back. The issue looks more likely related to SQuirreL. It
seems to be truncating anything after the '*' when submitting the query.
I tried with a standalone JDBC program on Windows and it succeeded in
submitting the full query and getting back the results from a remote Linux
Drillbit in distributed mode.
So, looks like a SQuirreL problem.
Can you try with a standalone program and the Drill 1.10 JDBC driver
(drill-jdbc-all-1.10.0*.jar) just to confirm that the issue is indeed in
the JDBC driver and not the SQuirreL application?
________________________________
Sent: Friday, March 31, 2017 11:58:56 AM
Subject: RE: Quoting queries
This seems to be a windows JDBC client specific problem.
select * from `nation_json/a/1/*/nation.json`;
<EOF> after : "`nation_json/a/1"
SQL Query select * from `nation_json/a/1
^
[Error Id: f67bb648-8ef2-418e-a53c-e8a835a4e3f9 on pssc-65.qa.lab:31010]
SQLState: null
ErrorCode: 0
The server profiles listing: http://<hostname>:8047/profiles/ Is showing
that the query submitted was select * from `nation_json/a/1
This works from Sqlline (Linux client) when connecting to the Linux Drillbit.
Please log a bug for this.
Thanks
-----Original Message-----
Sent: Friday, March 31, 2017 3:51 AM
Subject: AW: Quoting queries
BTW I tried with the 1.10 version on both sides (server and client) and I
still get the same error.
-----UrsprÃŒngliche Nachricht-----
Gesendet: Donnerstag, 30. MÀrz 2017 20:04
Betreff: Re: Quoting queries
What is the client machine from where you're issuing the query? Is it Windows?
Drill 1.10 has a fix for Windows wildcard: https://issues.apache.org/
jira/browse/DRILL-4812
Can you try with that?
Kunal Khatua
Engineering
[1490734684477_mapr.png]
www.mapr.com<http://www.mapr.com/>
________________________________
Sent: Thursday, March 30, 2017 9:26:25 AM
To: user
Subject: Re: Quoting queries
Hmm...strange. It works for me on drill 1.9.0 from the sqlline client. Can
you try running it from sqlline just so that we can eliminate other tools
trying to do some validation and failing?
0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/b/c.json`;
*+-----+*
*| **id ** |*
*+-----+*
*| *1 * |*
*+-----+*
1 row selected (0.209 seconds)
0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/*/c.json`;
*+-------+-----+*
*| **dir0 ** | **id ** |*
*+-------+-----+*
*| *b * | *1 * |*
*+-------+-----+*
1 row selected (0.233 seconds)
On Thu, Mar 30, 2017 at 12:57 AM, Lane David (ST-ESS/MKP3.2) <
Post by Lane David (ST-ESS/MKP3.2)
Hi all,
we are experimenting with Drill at the moment. Everything is working
fine on the server and I can execute any queries I need there
successfully. I followed the instructions on the following page to get
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
This has also been successful and I can execute simple queries from
Squirrel. However I get various parse errors when certain other
patterns are used.
select * from `a/b/c.json`;
select * from `a/*/c.json`;
<EOF> after : "`a"
select * from `a/\*/c.json`;
Table 'a/\*/c.json' not found
And various other combinations of \, /, ', etc.
I have tried Squirrel, SQL WB, Intellij
Anyone got this working?
Mit freundlichen GrÌßen / Best regards
David Lane
Product Management Cloud-based Services (ST-ESS/MKP3.2) Bosch
Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY
| boschbuildingsecurity.com<http://boschbuildingsecurity.com>
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; GeschÀftsfÌhrung: Gert van
Iperen, Andreas Bartz, Thomas Quante, Bernhard Schuster
Lane David (ST-ESS/MKP3.2)
2017-04-27 12:23:51 UTC
Permalink
Raw Message
Hi Ted,

No I tried that but the problem still exists. I have also tried this on other configurations (at home etc.) and it is a general problem (i.e. not related to my setup or choice of client).

Regards,
David

-----Original Message-----
From: Ted Dunning [mailto:***@gmail.com]
Sent: Mittwoch, 26. April 2017 23:59
To: user <***@drill.apache.org>
Subject: Re: Quoting queries

David,

Did the jdbc driver that Kunal recommended solve your problem?
Post by Lane David (ST-ESS/MKP3.2)
Hi all,
just to bump this, is there anything that can be done here? At the
moment I am reduced to executing queries on the command line and
scraping the data together afterwards which is partly very time consuming.
Mit freundlichen Grüßen / Best regards
David Lane
-----Ursprüngliche Nachricht-----
Gesendet: Dienstag, 4. April 2017 09:27
Betreff: AW: Quoting queries
I don't have time to write a test program but I can confirm that the
exact same problem with the same error message happens in Squirrel,
SqlWorkbench (
http://www.sql-workbench.net/) and intellij, so I'm pretty sure it's a
JDBC driver problem.
Mit freundlichen Grüßen / Best regards
David Lane
Product Management Cloud-based Services (ST-ESS/MKP3.2) Bosch
Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY |
boschbuildingsecurity.com Tel. +49(89)6290-1674 | Fax +49(89)6290 |
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; Geschäftsführung: Gert van
Iperen, Andreas Bartz, Thomas Quante, Bernhard Schuster
-----Ursprüngliche Nachricht-----
Gesendet: Freitag, 31. März 2017 23:30
Betreff: Re: Quoting queries
I take that back. The issue looks more likely related to SQuirreL. It
seems to be truncating anything after the '*' when submitting the query.
I tried with a standalone JDBC program on Windows and it succeeded in
submitting the full query and getting back the results from a remote
Linux Drillbit in distributed mode.
So, looks like a SQuirreL problem.
Can you try with a standalone program and the Drill 1.10 JDBC driver
(drill-jdbc-all-1.10.0*.jar) just to confirm that the issue is indeed
in the JDBC driver and not the SQuirreL application?
________________________________
Sent: Friday, March 31, 2017 11:58:56 AM
Subject: RE: Quoting queries
This seems to be a windows JDBC client specific problem.
select * from `nation_json/a/1/*/nation.json`;
<EOF> after : "`nation_json/a/1"
SQL Query select * from `nation_json/a/1
^
[Error Id: f67bb648-8ef2-418e-a53c-e8a835a4e3f9 on
pssc-65.qa.lab:31010]
SQLState: null
ErrorCode: 0
The server profiles listing: http://<hostname>:8047/profiles/ Is
showing that the query submitted was select * from `nation_json/a/1
This works from Sqlline (Linux client) when connecting to the Linux Drillbit.
Please log a bug for this.
Thanks
-----Original Message-----
Sent: Friday, March 31, 2017 3:51 AM
Subject: AW: Quoting queries
BTW I tried with the 1.10 version on both sides (server and client)
and I still get the same error.
-----Ursprüngliche Nachricht-----
Gesendet: Donnerstag, 30. März 2017 20:04
Betreff: Re: Quoting queries
What is the client machine from where you're issuing the query? Is it Windows?
Drill 1.10 has a fix for Windows wildcard: https://issues.apache.org/
jira/browse/DRILL-4812
Can you try with that?
Kunal Khatua
Engineering
[1490734684477_mapr.png]
www.mapr.com<http://www.mapr.com/>
________________________________
Sent: Thursday, March 30, 2017 9:26:25 AM
To: user
Subject: Re: Quoting queries
Hmm...strange. It works for me on drill 1.9.0 from the sqlline client.
Can you try running it from sqlline just so that we can eliminate
other tools trying to do some validation and failing?
0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/b/c.json`;
*+-----+*
*| **id ** |*
*+-----+*
*| *1 * |*
*+-----+*
1 row selected (0.209 seconds)
0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/*/c.json`;
*+-------+-----+*
*| **dir0 ** | **id ** |*
*+-------+-----+*
*| *b * | *1 * |*
*+-------+-----+*
1 row selected (0.233 seconds)
On Thu, Mar 30, 2017 at 12:57 AM, Lane David (ST-ESS/MKP3.2) <
Post by Lane David (ST-ESS/MKP3.2)
Hi all,
we are experimenting with Drill at the moment. Everything is working
fine on the server and I can execute any queries I need there
successfully. I followed the instructions on the following page to
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
This has also been successful and I can execute simple queries from
Squirrel. However I get various parse errors when certain other
patterns are used.
select * from `a/b/c.json`;
select * from `a/*/c.json`;
<EOF> after : "`a"
select * from `a/\*/c.json`;
Table 'a/\*/c.json' not found
And various other combinations of \, /, ', etc.
I have tried Squirrel, SQL WB, Intellij
Anyone got this working?
Mit freundlichen Grüßen / Best regards
David Lane
Product Management Cloud-based Services (ST-ESS/MKP3.2) Bosch
Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY
| boschbuildingsecurity.com<http://boschbuildingsecurity.com>
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; Geschäftsführung: Gert
van Iperen, Andreas Bartz, Thoma
Ted Dunning
2017-04-27 16:57:37 UTC
Permalink
Raw Message
David,

Did you specifically try the test that Kunal did (with a standalone JDBC
client)



On Thu, Apr 27, 2017 at 5:23 AM, Lane David (ST-ESS/MKP3.2) <
Post by Lane David (ST-ESS/MKP3.2)
Hi Ted,
No I tried that but the problem still exists. I have also tried this on
other configurations (at home etc.) and it is a general problem (i.e. not
related to my setup or choice of client).
Regards,
David
-----Original Message-----
Sent: Mittwoch, 26. April 2017 23:59
Subject: Re: Quoting queries
David,
Did the jdbc driver that Kunal recommended solve your problem?
On Wed, Apr 26, 2017 at 12:29 AM, Lane David (ST-ESS/MKP3.2) <
Post by Lane David (ST-ESS/MKP3.2)
Hi all,
just to bump this, is there anything that can be done here? At the
moment I am reduced to executing queries on the command line and
scraping the data together afterwards which is partly very time
consuming.
Post by Lane David (ST-ESS/MKP3.2)
Mit freundlichen GrÌßen / Best regards
David Lane
-----UrsprÃŒngliche Nachricht-----
Gesendet: Dienstag, 4. April 2017 09:27
Betreff: AW: Quoting queries
I don't have time to write a test program but I can confirm that the
exact same problem with the same error message happens in Squirrel,
SqlWorkbench (
http://www.sql-workbench.net/) and intellij, so I'm pretty sure it's a
JDBC driver problem.
Mit freundlichen GrÌßen / Best regards
David Lane
Product Management Cloud-based Services (ST-ESS/MKP3.2) Bosch
Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY |
boschbuildingsecurity.com Tel. +49(89)6290-1674 | Fax +49(89)6290 |
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; GeschÀftsfÌhrung: Gert van
Iperen, Andreas Bartz, Thomas Quante, Bernhard Schuster
-----UrsprÃŒngliche Nachricht-----
Gesendet: Freitag, 31. MÀrz 2017 23:30
Betreff: Re: Quoting queries
I take that back. The issue looks more likely related to SQuirreL. It
seems to be truncating anything after the '*' when submitting the query.
I tried with a standalone JDBC program on Windows and it succeeded in
submitting the full query and getting back the results from a remote
Linux Drillbit in distributed mode.
So, looks like a SQuirreL problem.
Can you try with a standalone program and the Drill 1.10 JDBC driver
(drill-jdbc-all-1.10.0*.jar) just to confirm that the issue is indeed
in the JDBC driver and not the SQuirreL application?
________________________________
Sent: Friday, March 31, 2017 11:58:56 AM
Subject: RE: Quoting queries
This seems to be a windows JDBC client specific problem.
select * from `nation_json/a/1/*/nation.json`;
<EOF> after : "`nation_json/a/1"
SQL Query select * from `nation_json/a/1
^
[Error Id: f67bb648-8ef2-418e-a53c-e8a835a4e3f9 on
pssc-65.qa.lab:31010]
SQLState: null
ErrorCode: 0
The server profiles listing: http://<hostname>:8047/profiles/ Is
showing that the query submitted was select * from `nation_json/a/1
This works from Sqlline (Linux client) when connecting to the Linux Drillbit.
Please log a bug for this.
Thanks
-----Original Message-----
Sent: Friday, March 31, 2017 3:51 AM
Subject: AW: Quoting queries
BTW I tried with the 1.10 version on both sides (server and client)
and I still get the same error.
-----UrsprÃŒngliche Nachricht-----
Gesendet: Donnerstag, 30. MÀrz 2017 20:04
Betreff: Re: Quoting queries
What is the client machine from where you're issuing the query? Is it Windows?
Drill 1.10 has a fix for Windows wildcard: https://issues.apache.org/
jira/browse/DRILL-4812
Can you try with that?
Kunal Khatua
Engineering
[1490734684477_mapr.png]
www.mapr.com<http://www.mapr.com/>
________________________________
Sent: Thursday, March 30, 2017 9:26:25 AM
To: user
Subject: Re: Quoting queries
Hmm...strange. It works for me on drill 1.9.0 from the sqlline client.
Can you try running it from sqlline just so that we can eliminate
other tools trying to do some validation and failing?
0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/b/c.json`;
*+-----+*
*| **id ** |*
*+-----+*
*| *1 * |*
*+-----+*
1 row selected (0.209 seconds)
0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/*/c.json`;
*+-------+-----+*
*| **dir0 ** | **id ** |*
*+-------+-----+*
*| *b * | *1 * |*
*+-------+-----+*
1 row selected (0.233 seconds)
On Thu, Mar 30, 2017 at 12:57 AM, Lane David (ST-ESS/MKP3.2) <
Post by Lane David (ST-ESS/MKP3.2)
Hi all,
we are experimenting with Drill at the moment. Everything is working
fine on the server and I can execute any queries I need there
successfully. I followed the instructions on the following page to
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
This has also been successful and I can execute simple queries from
Squirrel. However I get various parse errors when certain other
patterns are used.
select * from `a/b/c.json`;
select * from `a/*/c.json`;
<EOF> after : "`a"
select * from `a/\*/c.json`;
Table 'a/\*/c.json' not found
And various other combinations of \, /, ', etc.
I have tried Squirrel, SQL WB, Intellij
Anyone got this working?
Mit freundlichen GrÌßen / Best regards
David Lane
Product Management Cloud-based Services (ST-ESS/MKP3.2) Bosch
Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY
| boschbuildingsecurity.com<http://boschbuildingsecurity.com>
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; GeschÀftsfÌhrung: Gert
van Iperen, Andreas Bartz, Thomas Quante, Bernhard Schuster
Lane David (ST-ESS/MKP3.2)
2017-04-28 09:50:56 UTC
Permalink
Raw Message
Hi Ted,

I don't have time to do this and I'm not sure of the benefit. I'm not trying to be snide and I appreciate this is open source software and I have not paid for support etc. but even it does work with a self-written java program how does this help me or what does it mean? I have tried 3 "off the shelf" java clients and they all don't work with: in my opinion it would be worthwhile finding out why. There is even a help page that details how to get drill working with squirrel:
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/

Regards,
David

-----Ursprüngliche Nachricht-----
Von: Ted Dunning [mailto:***@gmail.com]
Gesendet: Donnerstag, 27. April 2017 18:58
An: user <***@drill.apache.org>
Betreff: Re: Quoting queries

David,

Did you specifically try the test that Kunal did (with a standalone JDBC
client)
Post by Lane David (ST-ESS/MKP3.2)
Hi Ted,
No I tried that but the problem still exists. I have also tried this
on other configurations (at home etc.) and it is a general problem
(i.e. not related to my setup or choice of client).
Regards,
David
-----Original Message-----
Sent: Mittwoch, 26. April 2017 23:59
Subject: Re: Quoting queries
David,
Did the jdbc driver that Kunal recommended solve your problem?
On Wed, Apr 26, 2017 at 12:29 AM, Lane David (ST-ESS/MKP3.2) <
Post by Lane David (ST-ESS/MKP3.2)
Hi all,
just to bump this, is there anything that can be done here? At the
moment I am reduced to executing queries on the command line and
scraping the data together afterwards which is partly very time
consuming.
Post by Lane David (ST-ESS/MKP3.2)
Mit freundlichen Grüßen / Best regards
David Lane
-----Ursprüngliche Nachricht-----
Gesendet: Dienstag, 4. April 2017 09:27
Betreff: AW: Quoting queries
I don't have time to write a test program but I can confirm that the
exact same problem with the same error message happens in Squirrel,
SqlWorkbench (
http://www.sql-workbench.net/) and intellij, so I'm pretty sure it's
a JDBC driver problem.
Mit freundlichen Grüßen / Best regards
David Lane
Product Management Cloud-based Services (ST-ESS/MKP3.2) Bosch
Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY
| boschbuildingsecurity.com Tel. +49(89)6290-1674 | Fax +49(89)6290
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; Geschäftsführung: Gert
van Iperen, Andreas Bartz, Thomas Quante, Bernhard Schuster
-----Ursprüngliche Nachricht-----
Gesendet: Freitag, 31. März 2017 23:30
Betreff: Re: Quoting queries
I take that back. The issue looks more likely related to SQuirreL.
It seems to be truncating anything after the '*' when submitting the query.
I tried with a standalone JDBC program on Windows and it succeeded
in submitting the full query and getting back the results from a
remote Linux Drillbit in distributed mode.
So, looks like a SQuirreL problem.
Can you try with a standalone program and the Drill 1.10 JDBC driver
(drill-jdbc-all-1.10.0*.jar) just to confirm that the issue is
indeed in the JDBC driver and not the SQuirreL application?
________________________________
Sent: Friday, March 31, 2017 11:58:56 AM
Subject: RE: Quoting queries
This seems to be a windows JDBC client specific problem.
select * from `nation_json/a/1/*/nation.json`;
<EOF> after : "`nation_json/a/1"
SQL Query select * from `nation_json/a/1
^
[Error Id: f67bb648-8ef2-418e-a53c-e8a835a4e3f9 on
pssc-65.qa.lab:31010]
SQLState: null
ErrorCode: 0
The server profiles listing: http://<hostname>:8047/profiles/ Is
showing that the query submitted was select * from `nation_json/a/1
This works from Sqlline (Linux client) when connecting to the Linux Drillbit.
Please log a bug for this.
Thanks
-----Original Message-----
Sent: Friday, March 31, 2017 3:51 AM
Subject: AW: Quoting queries
BTW I tried with the 1.10 version on both sides (server and client)
and I still get the same error.
-----Ursprüngliche Nachricht-----
Gesendet: Donnerstag, 30. März 2017 20:04
Betreff: Re: Quoting queries
What is the client machine from where you're issuing the query? Is it Windows?
https://issues.apache.org/
jira/browse/DRILL-4812
Can you try with that?
Kunal Khatua
Engineering
[1490734684477_mapr.png]
www.mapr.com<http://www.mapr.com/>
________________________________
Sent: Thursday, March 30, 2017 9:26:25 AM
To: user
Subject: Re: Quoting queries
Hmm...strange. It works for me on drill 1.9.0 from the sqlline client.
Can you try running it from sqlline just so that we can eliminate
other tools trying to do some validation and failing?
0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/b/c.json`;
*+-----+*
*| **id ** |*
*+-----+*
*| *1 * |*
*+-----+*
1 row selected (0.209 seconds)
0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/*/c.json`;
*+-------+-----+*
*| **dir0 ** | **id ** |*
*+-------+-----+*
*| *b * | *1 * |*
*+-------+-----+*
1 row selected (0.233 seconds)
On Thu, Mar 30, 2017 at 12:57 AM, Lane David (ST-ESS/MKP3.2) <
Post by Lane David (ST-ESS/MKP3.2)
Hi all,
we are experimenting with Drill at the moment. Everything is
working fine on the server and I can execute any queries I need
there successfully. I followed the instructions on the following
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
This has also been successful and I can execute simple queries
from Squirrel. However I get various parse errors when certain
other patterns are used.
select * from `a/b/c.json`;
select * from `a/*/c.json`;
<EOF> after : "`a"
select * from `a/\*/c.json`;
Table 'a/\*/c.json' not found
And various other combinations of \, /, ', etc.
I have tried Squirrel, SQL WB, Intellij
Anyone got this working?
Mit freundlichen Grüßen / Best regards
David Lane
Product Management Cloud-based Services (ST-ESS/MKP3.2) Bosch
Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY
| boschbuildingsecurity.com<http://boschbuildingsecurity.com>
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; Geschäftsführung: Gert
van Iperen, Andreas Bartz, Thomas Quante, Bernhard Schuster
Ted Dunning
2017-05-01 16:13:27 UTC
Permalink
Raw Message
On Fri, Apr 28, 2017 at 2:50 AM, Lane David (ST-ESS/MKP3.2) <
Post by Lane David (ST-ESS/MKP3.2)
but even it does work with a self-written java program how does this help
me or what does it mean? I have tried 3 "off the shelf" java clients and
they all don't work with: in my opinion it would be worthwhile finding out
why. There is even a help page that details how to get drill working with
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
The issue is that it helps the community figure out what is happening.

From my reading of the email record, I don't see a clear replication of the
problem. You clearly have it with squirrel. Kunal seems to have partially
replicated the problem, but it isn't clear that the problem he sees is the
same as what you see. In particular, in debugging a problem, it is really
important to get something that works and something that doesn't. IF you
can verify that what works for Kunal works for you, then the guys have
something to munch on.

I will check with him off-line.
Lane David (ST-ESS/MKP3.2)
2017-05-02 06:31:47 UTC
Permalink
Raw Message
Hi Ted,

I think the steps were included: see the next few lines. But in re-reading the emails I saw that Kunal said to file a bug which I somehow missed on first reading. I'll do that then.
Post by Lane David (ST-ESS/MKP3.2)
Post by Lane David (ST-ESS/MKP3.2)
select * from `a/*/c.json`;
<EOF> after : "`a"
select * from `a/\*/c.json`;
Table 'a/\*/c.json' not found
And various other combinations of \, /, ', etc.
-----Ursprüngliche Nachricht-----
Von: Ted Dunning [mailto:***@gmail.com]
Gesendet: Montag, 1. Mai 2017 18:13
An: user <***@drill.apache.org>
Betreff: Re: Quoting queries
Post by Lane David (ST-ESS/MKP3.2)
but even it does work with a self-written java program how does this
help me or what does it mean? I have tried 3 "off the shelf" java
clients and they all don't work with: in my opinion it would be
worthwhile finding out why. There is even a help page that details how
to get drill working with
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
The issue is that it helps the community figure out what is happening.

From my reading of the email record, I don't see a clear replication of the problem. You clearly have it with squirrel. Kunal seems to have partially replicated the problem, but it isn't clear that the problem he sees is the same as what you see. In particular, in debugging a problem, it is really important to get something that works and something that doesn't. IF you can verify that what works for Kunal works for you, then the guys have something to munch on.

I will check with him off-lin
Kunal Khatua
2017-05-02 18:02:21 UTC
Permalink
Raw Message
Hi David


I tried the queries on SQuirreL and everything following the asterisk in the 'table' name is truncated when the query is submitted by it.


However, when I tried another tool: DBeaver (http://dbeaver.jkiss.org/)

it worked!

Like SQuirreL, the DBeaver client's SQL Editor also shows the part following the asterisk in a grey color (indicating that it interprets the text as a comment). But, the client does submit the query.

So, this is not a bug in Drill, but a limitation within SQuirreL.

It is possible that the SQuirreL parser is limited in its ability to interpret the SQL, or that it is explicitly limiting this to avoid any SQL Injection (that's my guess).

I'd recommend you try working with DBeaver in the meanwhile. The tool actually has Drill drivers available (under Hadoop), so setup should be a breeze!

~ Kunal



________________________________
From: Lane David (ST-ESS/MKP3.2) <***@de.bosch.com>
Sent: Monday, May 1, 2017 11:31:47 PM
To: ***@drill.apache.org
Subject: AW: Quoting queries

Hi Ted,

I think the steps were included: see the next few lines. But in re-reading the emails I saw that Kunal said to file a bug which I somehow missed on first reading. I'll do that then.
Post by Lane David (ST-ESS/MKP3.2)
Post by Lane David (ST-ESS/MKP3.2)
select * from `a/*/c.json`;
<EOF> after : "`a"
select * from `a/\*/c.json`;
Table 'a/\*/c.json' not found
And various other combinations of \, /, ', etc.
-----Ursprüngliche Nachricht-----
Von: Ted Dunning [mailto:***@gmail.com]
Gesendet: Montag, 1. Mai 2017 18:13
An: user <***@drill.apache.org>
Betreff: Re: Quoting queries
Post by Lane David (ST-ESS/MKP3.2)
but even it does work with a self-written java program how does this
help me or what does it mean? I have tried 3 "off the shelf" java
clients and they all don't work with: in my opinion it would be
worthwhile finding out why. There is even a help page that details how
to get drill working with
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
The issue is that it helps the community figure out what is happening.

From my reading of the email record, I don't see a clear replication of the problem. You clearly have it with squirrel. Kunal seems to have partially replicated the problem, but it isn't clear that the problem he sees is the same as what you see. In particular, in debugging a problem, it is really important to get something that works and something that doesn't. IF you can verify that what works for Kunal works for you, then the guys have something to munch on.

I will check with him off-line.
Lane David (ST-ESS/MKP3.2)
2017-05-03 09:11:00 UTC
Permalink
Raw Message
Hi Kunal,

I tried dbeaver and it works thanks! I see what you say that everything is grey after the wildcard, but the query is executed and the results presented.

BTW, it's not just squirrel but also
http://www.sql-workbench.net/
https://www.jetbrains.com/idea/

that don't work. Maybe it would be useful to contact somebody on the team of either. I can open a ticket at intellij if you want as we have paid support.

Regards,
David

-----Ursprüngliche Nachricht-----
Von: Kunal Khatua [mailto:***@mapr.com]
Gesendet: Dienstag, 2. Mai 2017 20:02
An: ***@drill.apache.org
Betreff: Re: Quoting queries

Hi David


I tried the queries on SQuirreL and everything following the asterisk in the 'table' name is truncated when the query is submitted by it.


However, when I tried another tool: DBeaver (http://dbeaver.jkiss.org/)

it worked!

Like SQuirreL, the DBeaver client's SQL Editor also shows the part following the asterisk in a grey color (indicating that it interprets the text as a comment). But, the client does submit the query.

So, this is not a bug in Drill, but a limitation within SQuirreL.

It is possible that the SQuirreL parser is limited in its ability to interpret the SQL, or that it is explicitly limiting this to avoid any SQL Injection (that's my guess).

I'd recommend you try working with DBeaver in the meanwhile. The tool actually has Drill drivers available (under Hadoop), so setup should be a breeze!

~ Kunal



________________________________
From: Lane David (ST-ESS/MKP3.2) <***@de.bosch.com>
Sent: Monday, May 1, 2017 11:31:47 PM
To: ***@drill.apache.org
Subject: AW: Quoting queries

Hi Ted,

I think the steps were included: see the next few lines. But in re-reading the emails I saw that Kunal said to file a bug which I somehow missed on first reading. I'll do that then.
Post by Lane David (ST-ESS/MKP3.2)
Post by Lane David (ST-ESS/MKP3.2)
select * from `a/*/c.json`;
<EOF> after : "`a"
select * from `a/\*/c.json`;
Table 'a/\*/c.json' not found
And various other combinations of \, /, ', etc.
-----Ursprüngliche Nachricht-----
Von: Ted Dunning [mailto:***@gmail.com]
Gesendet: Montag, 1. Mai 2017 18:13
An: user <***@drill.apache.org>
Betreff: Re: Quoting queries
Post by Lane David (ST-ESS/MKP3.2)
but even it does work with a self-written java program how does this
help me or what does it mean? I have tried 3 "off the shelf" java
clients and they all don't work with: in my opinion it would be
worthwhile finding out why. There is even a help page that details how
to get drill working with
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
The issue is that it helps the community figure out what is happening.

From my reading of the email record, I don't see a clear replication of the problem. You clearly have it with squirrel. Kunal seems to have partially replicated the problem, but it isn't clear that the problem he sees is the same as what you see. In particular, in debugging a problem, it is really important to get something that works and something that doesn't. IF you can verify that what works for Kunal works for you, then the guys have something to munch on.

I will check with him off-line.
Kunal Khatua
2017-05-03 17:05:21 UTC
Permalink
Raw Message
Excellent!


We'd really appreciate it if you can open the ticket with IntelliJ. I'm hoping that the query text truncation is just a bug and not intentional.


I'll try to reach out to the developers behind the other two tools.


Thanks, David!


Kunal


P.S: On a side, were the errors with SQL-Workbench and Jetbrains the exact same truncation?

________________________________
From: Lane David (ST-ESS/MKP3.2) <***@de.bosch.com>
Sent: Wednesday, May 3, 2017 2:11:00 AM
To: ***@drill.apache.org
Subject: AW: Quoting queries

Hi Kunal,

I tried dbeaver and it works thanks! I see what you say that everything is grey after the wildcard, but the query is executed and the results presented.

BTW, it's not just squirrel but also
http://www.sql-workbench.net/
SQL Workbench/J - Home<http://www.sql-workbench.net/>
www.sql-workbench.net
Please note that SQL Workbench/J has no relation to the product MySQL Workbench which is maintained and owned by Oracle. If you are looking for MySQL Workbench ...



https://www.jetbrains.com/idea/
IntelliJ IDEA the Java IDE<https://www.jetbrains.com/idea/>
www.jetbrains.com
Every aspect of IntelliJ IDEA is specifically designed to maximize developer productivity. Together, powerful static code analysis and ergonomic design make ...




that don't work. Maybe it would be useful to contact somebody on the team of either. I can open a ticket at intellij if you want as we have paid support.

Regards,
David

-----Ursprüngliche Nachricht-----
Von: Kunal Khatua [mailto:***@mapr.com]
Gesendet: Dienstag, 2. Mai 2017 20:02
An: ***@drill.apache.org
Betreff: Re: Quoting queries

Hi David


I tried the queries on SQuirreL and everything following the asterisk in the 'table' name is truncated when the query is submitted by it.


However, when I tried another tool: DBeaver (http://dbeaver.jkiss.org/)

it worked!

Like SQuirreL, the DBeaver client's SQL Editor also shows the part following the asterisk in a grey color (indicating that it interprets the text as a comment). But, the client does submit the query.

So, this is not a bug in Drill, but a limitation within SQuirreL.

It is possible that the SQuirreL parser is limited in its ability to interpret the SQL, or that it is explicitly limiting this to avoid any SQL Injection (that's my guess).

I'd recommend you try working with DBeaver in the meanwhile. The tool actually has Drill drivers available (under Hadoop), so setup should be a breeze!

~ Kunal



________________________________
From: Lane David (ST-ESS/MKP3.2) <***@de.bosch.com>
Sent: Monday, May 1, 2017 11:31:47 PM
To: ***@drill.apache.org
Subject: AW: Quoting queries

Hi Ted,

I think the steps were included: see the next few lines. But in re-reading the emails I saw that Kunal said to file a bug which I somehow missed on first reading. I'll do that then.
Post by Lane David (ST-ESS/MKP3.2)
Post by Lane David (ST-ESS/MKP3.2)
select * from `a/*/c.json`;
<EOF> after : "`a"
select * from `a/\*/c.json`;
Table 'a/\*/c.json' not found
And various other combinations of \, /, ', etc.
-----Ursprüngliche Nachricht-----
Von: Ted Dunning [mailto:***@gmail.com]
Gesendet: Montag, 1. Mai 2017 18:13
An: user <***@drill.apache.org>
Betreff: Re: Quoting queries
Post by Lane David (ST-ESS/MKP3.2)
but even it does work with a self-written java program how does this
help me or what does it mean? I have tried 3 "off the shelf" java
clients and they all don't work with: in my opinion it would be
worthwhile finding out why. There is even a help page that details how
to get drill working with
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
The issue is that it helps the community figure out what is happening.

From my reading of the email record, I don't see a clear replication of the problem. You clearly have it with squirrel. Kunal seems to have partially replicated the problem, but it isn't clear that the problem he sees is the same as what you see. In particular, in debugging a problem, it is really important to get something that works and something that doesn't. IF you can verify that what works for Kunal works for you, then the guys have something to munch on.

I will check with him off-line.
Kunal Khatua
2017-05-03 20:54:26 UTC
Permalink
Raw Message
Hi David


Just got back a reply from SQuirreL developers. The truncation occurs due to the '/*..*/ being treated as multi-line comments.


The steps to enable SQuirreL to submit such queries without truncation is to disable the comments being submitted.

------------------------------------------------------------------------------

Reference: https://sourceforge.net/p/squirrel-sql/bugs/1300/


Please got to menu File -> New Session Properties -> Tab SQL ->

Uncheck the "Remove multi line comment (/.../) from SQL before sending to database" checkbox in the lower part of the panel.
------------------------------------------------------------------------------

This worked for me. I'm presuming there *might* be something similar for other tools as well.

I'll close the ticket with SQuirreL in the meanwhile.

Kunal

________________________________
From: Kunal Khatua <***@mapr.com>
Sent: Wednesday, May 3, 2017 10:05:21 AM
To: ***@drill.apache.org
Subject: Re: Quoting queries


Excellent!


We'd really appreciate it if you can open the ticket with IntelliJ. I'm hoping that the query text truncation is just a bug and not intentional.


I'll try to reach out to the developers behind the other two tools.


Thanks, David!


Kunal


P.S: On a side, were the errors with SQL-Workbench and Jetbrains the exact same truncation?

________________________________
From: Lane David (ST-ESS/MKP3.2) <***@de.bosch.com>
Sent: Wednesday, May 3, 2017 2:11:00 AM
To: ***@drill.apache.org
Subject: AW: Quoting queries

Hi Kunal,

I tried dbeaver and it works thanks! I see what you say that everything is grey after the wildcard, but the query is executed and the results presented.

BTW, it's not just squirrel but also
http://www.sql-workbench.net/
SQL Workbench/J - Home<http://www.sql-workbench.net/>
www.sql-workbench.net<http://www.sql-workbench.net>
Please note that SQL Workbench/J has no relation to the product MySQL Workbench which is maintained and owned by Oracle. If you are looking for MySQL Workbench ...



https://www.jetbrains.com/idea/
IntelliJ IDEA the Java IDE<https://www.jetbrains.com/idea/>
www.jetbrains.com<http://www.jetbrains.com>
Every aspect of IntelliJ IDEA is specifically designed to maximize developer productivity. Together, powerful static code analysis and ergonomic design make ...




that don't work. Maybe it would be useful to contact somebody on the team of either. I can open a ticket at intellij if you want as we have paid support.

Regards,
David

-----Ursprüngliche Nachricht-----
Von: Kunal Khatua [mailto:***@mapr.com]
Gesendet: Dienstag, 2. Mai 2017 20:02
An: ***@drill.apache.org
Betreff: Re: Quoting queries

Hi David


I tried the queries on SQuirreL and everything following the asterisk in the 'table' name is truncated when the query is submitted by it.


However, when I tried another tool: DBeaver (http://dbeaver.jkiss.org/)

it worked!

Like SQuirreL, the DBeaver client's SQL Editor also shows the part following the asterisk in a grey color (indicating that it interprets the text as a comment). But, the client does submit the query.

So, this is not a bug in Drill, but a limitation within SQuirreL.

It is possible that the SQuirreL parser is limited in its ability to interpret the SQL, or that it is explicitly limiting this to avoid any SQL Injection (that's my guess).

I'd recommend you try working with DBeaver in the meanwhile. The tool actually has Drill drivers available (under Hadoop), so setup should be a breeze!

~ Kunal



________________________________
From: Lane David (ST-ESS/MKP3.2) <***@de.bosch.com>
Sent: Monday, May 1, 2017 11:31:47 PM
To: ***@drill.apache.org
Subject: AW: Quoting queries

Hi Ted,

I think the steps were included: see the next few lines. But in re-reading the emails I saw that Kunal said to file a bug which I somehow missed on first reading. I'll do that then.
Post by Lane David (ST-ESS/MKP3.2)
Post by Lane David (ST-ESS/MKP3.2)
select * from `a/*/c.json`;
<EOF> after : "`a"
select * from `a/\*/c.json`;
Table 'a/\*/c.json' not found
And various other combinations of \, /, ', etc.
-----Ursprüngliche Nachricht-----
Von: Ted Dunning [mailto:***@gmail.com]
Gesendet: Montag, 1. Mai 2017 18:13
An: user <***@drill.apache.org>
Betreff: Re: Quoting queries
Post by Lane David (ST-ESS/MKP3.2)
but even it does work with a self-written java program how does this
help me or what does it mean? I have tried 3 "off the shelf" java
clients and they all don't work with: in my opinion it would be
worthwhile finding out why. There is even a help page that details how
to get drill working with
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
The issue is that it helps the community figure out what is happening.

From my reading of the email record, I don't see a clear replication of the problem. You clearly have it with squirrel. Kunal seems to have partially replicated the problem, but it isn't clear that the problem he sees is the same as what you see. In particular, in debugging a problem, it is really important to get something that works and something that doesn't. IF you can verify that what works for Kunal works for you, then the guys have something to munch on.

I will check with him off-line.
Lane David (ST-ESS/MKP3.2)
2017-05-04 09:22:04 UTC
Permalink
Raw Message
Hi Kunal,

wow I never thought of that with the comments but it makes perfect sense. Thanks! I looked for a similar setting in intellij but couldn't find one so have filed a bug. I think it would be helpful to others to put the info below onto the page https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/

Regards and thanks again,
David


-----Ursprüngliche Nachricht-----
Von: Kunal Khatua [mailto:***@mapr.com]
Gesendet: Mittwoch, 3. Mai 2017 22:54
An: ***@drill.apache.org
Betreff: Re: Quoting queries

Hi David


Just got back a reply from SQuirreL developers. The truncation occurs due to the '/*..*/ being treated as multi-line comments.


The steps to enable SQuirreL to submit such queries without truncation is to disable the comments being submitted.

------------------------------------------------------------------------------

Reference: https://sourceforge.net/p/squirrel-sql/bugs/1300/


Please got to menu File -> New Session Properties -> Tab SQL ->

Uncheck the "Remove multi line comment (/.../) from SQL before sending to database" checkbox in the lower part of the panel.
------------------------------------------------------------------------------

This worked for me. I'm presuming there *might* be something similar for other tools as well.

I'll close the ticket with SQuirreL in the meanwhile.

Kunal

________________________________
From: Kunal Khatua <***@mapr.com>
Sent: Wednesday, May 3, 2017 10:05:21 AM
To: ***@drill.apache.org
Subject: Re: Quoting queries


Excellent!


We'd really appreciate it if you can open the ticket with IntelliJ. I'm hoping that the query text truncation is just a bug and not intentional.


I'll try to reach out to the developers behind the other two tools.


Thanks, David!


Kunal


P.S: On a side, were the errors with SQL-Workbench and Jetbrains the exact same truncation?

________________________________
From: Lane David (ST-ESS/MKP3.2) <***@de.bosch.com>
Sent: Wednesday, May 3, 2017 2:11:00 AM
To: ***@drill.apache.org
Subject: AW: Quoting queries

Hi Kunal,

I tried dbeaver and it works thanks! I see what you say that everything is grey after the wildcard, but the query is executed and the results presented.

BTW, it's not just squirrel but also
http://www.sql-workbench.net/
SQL Workbench/J - Home<http://www.sql-workbench.net/>
www.sql-workbench.net<http://www.sql-workbench.net>
Please note that SQL Workbench/J has no relation to the product MySQL Workbench which is maintained and owned by Oracle. If you are looking for MySQL Workbench ...



https://www.jetbrains.com/idea/
IntelliJ IDEA the Java IDE<https://www.jetbrains.com/idea/>
www.jetbrains.com<http://www.jetbrains.com>
Every aspect of IntelliJ IDEA is specifically designed to maximize developer productivity. Together, powerful static code analysis and ergonomic design make ...




that don't work. Maybe it would be useful to contact somebody on the team of either. I can open a ticket at intellij if you want as we have paid support.

Regards,
David

-----Ursprüngliche Nachricht-----
Von: Kunal Khatua [mailto:***@mapr.com]
Gesendet: Dienstag, 2. Mai 2017 20:02
An: ***@drill.apache.org
Betreff: Re: Quoting queries

Hi David


I tried the queries on SQuirreL and everything following the asterisk in the 'table' name is truncated when the query is submitted by it.


However, when I tried another tool: DBeaver (http://dbeaver.jkiss.org/)

it worked!

Like SQuirreL, the DBeaver client's SQL Editor also shows the part following the asterisk in a grey color (indicating that it interprets the text as a comment). But, the client does submit the query.

So, this is not a bug in Drill, but a limitation within SQuirreL.

It is possible that the SQuirreL parser is limited in its ability to interpret the SQL, or that it is explicitly limiting this to avoid any SQL Injection (that's my guess).

I'd recommend you try working with DBeaver in the meanwhile. The tool actually has Drill drivers available (under Hadoop), so setup should be a breeze!

~ Kunal



________________________________
From: Lane David (ST-ESS/MKP3.2) <***@de.bosch.com>
Sent: Monday, May 1, 2017 11:31:47 PM
To: ***@drill.apache.org
Subject: AW: Quoting queries

Hi Ted,

I think the steps were included: see the next few lines. But in re-reading the emails I saw that Kunal said to file a bug which I somehow missed on first reading. I'll do that then.
Post by Lane David (ST-ESS/MKP3.2)
Post by Lane David (ST-ESS/MKP3.2)
select * from `a/*/c.json`;
<EOF> after : "`a"
select * from `a/\*/c.json`;
Table 'a/\*/c.json' not found
And various other combinations of \, /, ', etc.
-----Ursprüngliche Nachricht-----
Von: Ted Dunning [mailto:***@gmail.com]
Gesendet: Montag, 1. Mai 2017 18:13
An: user <***@drill.apache.org>
Betreff: Re: Quoting queries
Post by Lane David (ST-ESS/MKP3.2)
but even it does work with a self-written java program how does this
help me or what does it mean? I have tried 3 "off the shelf" java
clients and they all don't work with: in my opinion it would be
worthwhile finding out why. There is even a help page that details how
to get drill working with
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
The issue is that it helps the community figure out what is happening.

From my reading of the email record, I don't see a clear replication of the problem. You clearly have it with squirrel. Kunal seems to have partially replicated the problem, but it isn't clear that the problem he sees is the same as what you see. In particular, in debugging a problem, it is really important to get something that works and something that doesn't. IF you can verify that what works for Kunal works for you, then the guys have something to munch on.

I will check with him off-line.

Lane David (ST-ESS/MKP3.2)
2017-03-31 06:55:39 UTC
Permalink
Raw Message
Hi Rahul,

thanks for the answer. Yes it works fine from the server / command line client (sqlline / drill-localhost). An I am on windows using drill-jdbc-all-1.9.0.jar, trying from within several client programs (squirrel, sqlwb etc.) to eliminate them from the equation.

Regards,
David

-----Ursprüngliche Nachricht-----
Von: rahul challapalli [mailto:***@gmail.com]
Gesendet: Donnerstag, 30. März 2017 18:26
An: user <***@drill.apache.org>
Betreff: Re: Quoting queries

Hmm...strange. It works for me on drill 1.9.0 from the sqlline client. Can you try running it from sqlline just so that we can eliminate other tools trying to do some validation and failing?

0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/b/c.json`;

*+-----+*

*| **id ** |*

*+-----+*

*| *1 * |*

*+-----+*

1 row selected (0.209 seconds)

0: jdbc:drill:zk=x.x.x.x:5181> select * from `a/*/c.json`;

*+-------+-----+*

*| **dir0 ** | **id ** |*

*+-------+-----+*

*| *b * | *1 * |*

*+-------+-----+*

1 row selected (0.233 seconds)
Post by Lane David (ST-ESS/MKP3.2)
Hi all,
we are experimenting with Drill at the moment. Everything is working
fine on the server and I can execute any queries I need there
successfully. I followed the instructions on the following page to get
https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
This has also been successful and I can execute simple queries from
Squirrel. However I get various parse errors when certain other
patterns are used.
select * from `a/b/c.json`;
select * from `a/*/c.json`;
Error: PARSE ERROR: Lexical error at line 1, column 44. Encountered: <EOF> after : "`a"
select * from `a/\*/c.json`;
Table 'a/\*/c.json' not found
And various other combinations of \, /, ', etc.
I have tried Squirrel, SQL WB, Intellij
Anyone got this working?
Mit freundlichen Grüßen / Best regards
David Lane
Product Management Cloud-based Services (ST-ESS/MKP3.2) Bosch
Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY
| boschbuildingsecurity.com<http://boschbuildingsecurity.com>
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; Geschäftsführung: Gert van
Iperen, Andreas Bartz,
Loading...