implydata/plyql

Still Issue with SiSense BI Tools

richiesgr opened this issue · 5 comments

Hi

I've already open a ticket regarding this request
SELECT DISTINCT TABLE_NAME, TABLE_TYPE, (TABLE_SCHEMA) AS TABLE_SCHEMA FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = N'plyql1'

Where I try this query I get this

[7] Got SQL: SELECT DISTINCT `TABLE_NAME`, `TABLE_TYPE`, (TABLE_SCHEMA) AS `TABLE_SCHEMA` FROM INFORMATION_SCHEMA.TABLES WHERE `TABLE_SCHEMA` = N'plyql1'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Failed to resolve query with Plywood.
Query:
SELECT DISTINCT `TABLE_NAME`, `TABLE_TYPE`, (TABLE_SCHEMA) AS `TABLE_SCHEMA` FROM INFORMATION_SCHEMA.TABLES WHERE `TABLE_SCHEMA` = N'plyql1'
If you believe this query should work please create an issue on PlyQL and include this section
Issue url: https://github.com/implydata/plyql/issues
Message:
SQL parse error: Expected "*", "+", "-", ".", "/", ";", "AND", "GROUP", "HAVING", "LIMIT", "OR", "ORDER" or end of input but "'" found. on 'SELECT DISTINCT `TABLE_NAME`, `TABLE_TYPE`, (TABLE_SCHEMA) AS `TABLE_SCHEMA` FROM INFORMATION_SCHEMA.TABLES WHERE `TABLE_SCHEMA` = N'plyql1''
Stack:
Error: SQL parse error: Expected "*", "+", "-", ".", "/", ";", "AND", "GROUP", "HAVING", "LIMIT", "OR", "ORDER" or end of input but "'" found. on 'SELECT DISTINCT `TABLE_NAME`, `TABLE_TYPE`, (TABLE_SCHEMA) AS `TABLE_SCHEMA` FROM INFORMATION_SCHEMA.TABLES WHERE `TABLE_SCHEMA` = N'plyql1''
    at Function.Expression.parseSQL (/home/ubuntu/imply-1.3.0/dist/pivot/node_modules/plywood/build/plywood.js:5985:23)
    at /home/ubuntu/imply-1.3.0/dist/pivot/node_modules/plyql/build/plyql-mysql-gateway.js:43:53
    at Promise.apply (/home/ubuntu/imply-1.3.0/dist/pivot/node_modules/q/q.js:1165:26)
    at Promise.promise.promiseDispatch (/home/ubuntu/imply-1.3.0/dist/pivot/node_modules/q/q.js:788:41)
    at /home/ubuntu/imply-1.3.0/dist/pivot/node_modules/q/q.js:1391:14
    at runSingle (/home/ubuntu/imply-1.3.0/dist/pivot/node_modules/q/q.js:137:13)
    at flush (/home/ubuntu/imply-1.3.0/dist/pivot/node_modules/q/q.js:125:13)
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickCallback (node.js:349:13)

could you help me ?

that is so strange. I am running on the latest plyql and that query seems to work:

mysql> SELECT DISTINCT `TABLE_NAME`, `TABLE_TYPE`, (TABLE_SCHEMA) AS `TABLE_SCHEMA` FROM INFORMATION_SCHEMA.TABLES WHERE `TABLE_SCHEMA` = N'plyql1';
+-------------------+------------+--------------+
| TABLE_NAME        | TABLE_TYPE | TABLE_SCHEMA |
+-------------------+------------+--------------+
| wikipedia         | BASE TABLE | plyql1       |
| wikipedia-compact | BASE TABLE | plyql1       |
+-------------------+------------+--------------+
2 rows in set (0.01 sec)

What version of plyql are you on? plyql --version

plyql version 0.9.14 (plywood version 0.15.7)

I feel really dumb !!!
I've installed the new version but started the old one
Sorry I close this

Hi

Reopening this because I've still problem to connect SiSense to Druid and now it's because that Sisense decide even for A table build on my own query to postfix it with "Limit 0,0"

This is the request sent by sisense
SELECT publisherId, 
....
GROUP BY ....
LIMIT 0,0

I get

Instantiation of [simple type, class io.druid.query.topn.TopNQuery] value failed: Threshold cannot be equal to 0.
Stack:
Error: Instantiation of [simple type, class io.druid.query.topn.TopNQuery] value failed: Threshold cannot be equal to 0.
    at /usr/lib/node_modules/plyql/node_modules/plywood-druid-requester/build/druidRequester.js:172:27
    at _fulfilled (/usr/lib/node_modules/plyql/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/usr/lib/node_modules/plyql/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/usr/lib/node_modules/plyql/node_modules/q/q.js:796:13)
    at /usr/lib/node_modules/plyql/node_modules/q/q.js:604:44
    at runSingle (/usr/lib/node_modules/plyql/node_modules/q/q.js:137:13)
    at flush (/usr/lib/node_modules/plyql/node_modules/q/q.js:125:13)
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickCallback (node.js:349:13)


I understand that it's even not a problem with plyql but more with druid that do not receive limit 0 as valid for TopN query

Do you think I can found a passthrough ?

Thanks

Please note that this project is now deprecated. Please see the Druid SQL docs for information on using SQL syntax with Druid.