Yeah I think there are 2 separate issues, if you have 2 or more schema with the same table name available, it will freak out, which is part 1. Part 2, when you get past that(I just renamed a few tables in my test) the SQL then doesn't prepend the Schema name and so then fails because its doing Select * from DB.Table instead of Select * from DB.Schema.Table.
I have the code here, I'm trying to rectify 2, if I get past that I'll take a look at 1 (I'm not a committer though so don't hold me to it! ;)) On Wed, Oct 28, 2015 at 2:12 PM, Kyle Marek-Spartz < [email protected]> wrote: > I had a similar issue with Oracle and filed: > > https://issues.apache.org/jira/browse/DRILL-3970 > > Tom Barber writes: > > > Hi, > > > > Yeah I'm having similar issues, although with Exasol not MSSQL, I get the > > feeling that the driver doesn't understand what a schema is in my case, > > which could be plausible considering mysql doesn't have the concept of > > schema. > > > > I'll have a poke around the source code later. > > > > Tom > > > > On Wed, Oct 28, 2015 at 10:52 AM, Holy Alexander < > > [email protected]> wrote: > > > >> I would love to use the new Drill 1.2 Feature and combine drill and > >> relational backend queries. > >> > >> Specifically, I would like to use this with Microsoft SQL Server 2014 > as a > >> backend. > >> (I am running Drill in embedded mode on Windows, but this should not > >> affect the following?) > >> > >> Following the documentation I copied sqljdbc42.jar (the most recent > >> official Microsoft SQL JDBC Driver) to the ...\jars\3rdparty directory. > >> > >> I configured a storage plugin named "sqldwh", defined as: > >> { > >> "type": "jdbc", > >> "driver": "com.microsoft.sqlserver.jdbc.SQLServerDriver", > >> "url": "jdbc:sqlserver://SQLSERVERNAME", > >> "username": "USERNAME", > >> "password": "PASSWORD", > >> "enabled": true > >> } > >> > >> (SQLSERVERNAME, USERNAME, PASSWORD, DATABASENAME, TABLENAME obviously > >> replaced with real configuration) > >> > >> Drill reports "success". > >> > >> Running a query like > >> select * from sqldwh.DATABASENAME.dbo.TABLENAME > >> > >> reports Table not found. Obviously the USERNAME/PASSWORD is properly > >> authorized to read this table. > >> > >> The Error reported is: > >> Query Failed: An Error Occurred > >> org.apache.drill.common.exceptions.UserRemoteException: VALIDATION > ERROR: > >> From line 2, column 6 to line 2, column 11: Table > >> 'sqldwh.DATABASENAME.dbo.TABLENAME' not found [Error Id: > >> fc51f6e0-b0b7-448d-94c2-3a3666750416 on PC1234:31010] > >> > >> I'm lost at this point. > >> > >> First and foremost: Is this supposed to work at all? (with anything else > >> than MySql?) > >> > >> > >> > > -- > Kyle Marek-Spartz >
