You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by Eric Pederson <er...@gmail.com> on 2016/05/12 22:54:55 UTC
Errors querying Sybase databases using RDBMS plugin
Hi all:
I set up a Sybase ASE DB using the RDBMS storage plugin. Using show
schemas and show tables I can see the schemas and tables. However, when I
do a query, it's adding the schema name in the query and apparently Sybase
doesn't like it. For example:
0: jdbc:drill:zk=local> select count(*) from dbfs_user;
Error: DATA_READ ERROR: The JDBC storage plugin failed while trying setup
the SQL query.
sql SELECT COUNT(*) AS "EXPR$0"
FROM (SELECT 0 AS "$f0"
FROM "kozo_analytics"."dbfs_user") AS "t"
plugin sybase
Fragment 0:0
[Error Id: 12df15ae-6547-4332-91eb-c1cebd113003 on totlxfidevsp202:31010]
(java.sql.SQLException) "kozo_analytics"."dbfs_user" not found. Specify
owner.objectname or use sp_help to check whether the object exists (sp_help
may produce lots of output).
com.sybase.jdbc4.jdbc.SybConnection.getAllExceptions():-1
com.sybase.jdbc4.jdbc.SybStatement.handleSQLE():-1
com.sybase.jdbc4.jdbc.SybStatement.nextResult():-1
com.sybase.jdbc4.jdbc.SybStatement.nextResult():-1
com.sybase.jdbc4.jdbc.SybStatement.queryLoop():-1
com.sybase.jdbc4.jdbc.SybStatement.executeQuery():-1
com.sybase.jdbc4.jdbc.SybStatement.executeQuery():-1
org.apache.commons.dbcp.DelegatingStatement.executeQuery():208
org.apache.commons.dbcp.DelegatingStatement.executeQuery():208
org.apache.drill.exec.store.jdbc.JdbcRecordReader.setup():177
If I try that same query directly using a query tool I get the same error.
I've tried all the combinations of use and select including/excluding the
schema name and it either says the table doesn't exist, or it includes the
schema name and Sybase complains. Is there a way to disable including the
schema name in the query?
I also set up a Sybase IQ database using the RDBMS plugin. When I try to
query any table I get this error:
0: jdbc:drill:zk=local> select count(*) from collat_history;
Error: VALIDATION ERROR: Multiple entries with same key:
IssuerHist=JdbcTable {IssuerHist} and IssuerHist=JdbcTable {IssuerHist}
SQL Query null
[Error Id: 87e82e30-fcdb-4f6e-8c3f-0295c0770b97 on totlxfidevsp202:31010]
(java.lang.IllegalArgumentException) Multiple entries with same key:
IssuerHist=JdbcTable {IssuerHist} and IssuerHist=JdbcTable {IssuerHist}
com.google.common.collect.ImmutableMap.checkNoConflict():150
com.google.common.collect.RegularImmutableMap.checkNoConflictInBucket():104
com.google.common.collect.RegularImmutableMap.<init>():70
com.google.common.collect.ImmutableMap$Builder.build():254
org.apache.calcite.adapter.jdbc.JdbcSchema.computeTables():218
org.apache.calcite.adapter.jdbc.JdbcSchema.getTableMap():234
org.apache.calcite.adapter.jdbc.JdbcSchema.getTable():228
org.apache.drill.exec.store.jdbc.JdbcStoragePlugin$CapitalizingJdbcSchema.getTable():291
Any ideas?
Thanks,
-- Eric