Ah, the URL isn't quite right. Try changing it to http://localhost:8082/druid/v2/sql/avatica/ (include 'avatica' and the trailing slash) and make sure druid.sql.enable = true is set in your Druid runtime properties.
Gian On Mon, Jun 26, 2017 at 1:20 PM, Jack Ingoldsby <[email protected]> wrote: > Hi, > Thanks. I've tried no username and password > sqlline> !connect jdbc:avatica:remote:url=http:/ > /localhost:8082/druid/v2/sql > > Enter username for jdbc:avatica:remote:url= > http://localhost:8082/druid/v2/sql:(left blank) > Enter password for jdbc:avatica:remote:url= > http://localhost:8082/druid/v2/sql:(left blank) > > Get the following response, which unfoptunately I don't really know how to > decipher > > java.lang.RuntimeException: Failed to execute HTTP Request, got HTTP/405 > at > org.apache.calcite.avatica.remote.AvaticaCommonsHttpClientIm > pl.send(AvaticaCommonsHttpClientImpl.java:160) > at > org.apache.calcite.avatica.remote.RemoteService.apply(Remote > Service.java:34) > at > org.apache.calcite.avatica.remote.JsonService.apply(JsonService.java:172) > at org.apache.calcite.avatica.remote.Driver.connect(Driver.java > :176) > at sqlline.DatabaseConnection.connect(DatabaseConnection.java:156) > at > sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:204) > at sqlline.Commands.connect(Commands.java:1095) > at sqlline.Commands.connect(Commands.java:1001) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce > ssorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe > thodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:38) > at sqlline.SqlLine.dispatch(SqlLine.java:791) > at sqlline.SqlLine.begin(SqlLine.java:668) > at sqlline.SqlLine.start(SqlLine.java:373) > at sqlline.SqlLine.main(SqlLine.java:265) > > > > > > On Mon, Jun 26, 2017 at 3:04 PM, Gian Merlino <[email protected]> wrote: > > > Hey Jack, > > > > Based on the URL http://localhost:8082/druid/v2/sql it looks like you're > > using the built in Druid SQL. It doesn't support authentication yet so > you > > could put anything in for user/password (it will be ignored). This will > > change in the future, when there will be a server-side option to enable > > authentication. > > > > Gian > > > > On Sun, Jun 25, 2017 at 4:13 AM, Jack Ingoldsby < > [email protected]> > > wrote: > > > > > Hi Slim, > > > Thanks for your response. Sorry for delay in responding, but I realized > > had > > > not actually subscribed to the group. > > > So to use Calcite or the experimental SQL remotely I think I need > > Avatica. > > > I've installed it (the Avatica installation test succeeded), but I'm > not > > a > > > Java programmer, and I'm finding some difficulties figuring out how to > > > connect to Avatica, or what I need to configure (passwords etc). > > > > > > If enter the following I can connect locally via SQLLine just using > > > Calcite, and can query > > > > > > !connectjdbc:calcite:schemaFactory=org.apache.calcite.adapter.druid. > > > DruidSchemaFactory;schema.url=http://localhost:8082;schema. > > coordinatorUrl > > > =http://localhost:8081 admin admin > > > > > > If I enter the following locally. > > > > > > !connect jdbc:avatica:remote:url=http://localhost:8082/druid/v2/sql > > > > > > I get asked for a username and password, but I don't know what the > > default > > > ids are, or where to adjust them (I assume there is a config file or > > > something, but I don't have the Java background to understand where > they > > > might be). > > > > > > Actually for this test, if there is a default username/pwd that would > be > > > fine. I just want to do a proof of connectivity/querying against dummy > > > data. > > > Thanks and regards, > > > Jack > > > > > > > > > > > > > > > > > > > > > > > > From Slim Bouguerra <[email protected]> > > > Subject Re: Setting up remote JDBC Calcite Against Druid > > > Date Wed, 21 Jun 2017 19:19:55 GMT > > > have you looked at this ? > > > https://hortonworks.com/blog/connect-tableau-druid-hive/ < > > > https://hortonworks.com/blog/connect-tableau-druid-hive/> > > > > > > Also druid as a built in SQL layer starting from druid 0.10.0 thus you > > can > > > use it to connect > > > tableau as well > > > http://druid.io/docs/latest/querying/sql.html < > > > http://druid.io/docs/latest/querying/sql.html> > > > > > > > > > -- > > > > > > B-Slim > > > _______/\/\/\_______/\/\/\_______/\/\/\_______/\/\/\_______/ > \/\/\_______ > > > > > > > On Jun 21, 2017, at 11:49 AM, Jack Ingoldsby < > [email protected] > > > > > > wrote: > > > > > > > > Hi, > > > > I was asked by one of our sales guys to have a look at seeing if our > > BI > > > > tool can query Druid. > > > > I spun up an AWS Linux instance, installed Druid, have populated with > > 43 > > > > records from wikiticker. > > > > > > > > I can query on the instance using Calcite Sqlline with the jdbc > > > connection > > > > string > > > > > > > > > > > !connectjdbc:calcite:schemaFactory=org.apache.calcite.adapter.druid. > > > DruidSchemaFactory;schema.url=http://localhost:8082;schema. > > coordinatorUrl > > > > =http://localhost:8081 admin admin > > > > > > > > > > > > I've installed Avatica/Calcite on my local windows machine, but am > not > > > > really sure how to connect to the remote instance... I've made a > > genuine > > > > effort searching including the archives, but no avail . > > > > > > > > Are there any steps or examples of setting up remote connections? I > > need > > > > to demonstrate it is possible for a customer demo tomorrow (in > > > principle, > > > > performance not yet a concern), so any help would be greatly > > appreciated. > > > > > > > > Thanks, > > > > Jack > > > > > > On Wed, Jun 21, 2017 at 2:49 PM, Jack Ingoldsby < > > [email protected]> > > > wrote: > > > > > > > Hi, > > > > I was asked by one of our sales guys to have a look at seeing if our > > BI > > > > tool can query Druid. > > > > I spun up an AWS Linux instance, installed Druid, have populated with > > 43 > > > > records from wikiticker. > > > > > > > > I can query on the instance using Calcite Sqlline with the jdbc > > > > connection string > > > > > > > > > > > > !connectjdbc:calcite:schemaFactory=org.apache.calcite.adapter.druid. > > > DruidSchemaFactory;schema.url=http://localhost:8082;schema. > > coordinatorUrl > > > > =http://localhost:8081 admin admin > > > > > > > > > > > > I've installed Avatica/Calcite on my local windows machine, but am > not > > > > really sure how to connect to the remote instance... I've made a > > genuine > > > > effort searching including the archives, but no avail . > > > > > > > > Are there any steps or examples of setting up remote connections? I > > need > > > > to demonstrate it is possible for a customer demo tomorrow (in > > > principle, > > > > performance not yet a concern), so any help would be greatly > > appreciated. > > > > > > > > Thanks, > > > > Jack > > > > > > > > > >
