AST parse error when query contains remote
See original GitHub issueI have simple query on single stat panel
SELECT
toFloat64(sum(bid))
FROM remote('$clickhouse_host', events)
WHERE and action_type = 'view' AND date >= toStartOfMonth(now())
In browser console i see error
sql_query.ts:86 AST parser error: TypeError: this.tree[this.rootToken].push is not a function
at Scanner.push (scanner.ts:79)
at Scanner.toAST (scanner.ts:118)
at SqlQuery.replace (sql_query.ts:43)
at ClickHouseDatasource.createQuery (datasource.ts:135)
at eval (datasource.ts:85)
at Qt (lodash.js:639)
at Function.Ja [as map] (lodash.js:9555)
at d (lodash.js:16993)
at Ba (lodash.js:8797)
at lodash.js:4374
With debugger i found that problem is located in remote
function after i delete it and add GROUP BY 1
this issue fixed.
Also it’s not obvious that i need GROUP BY
statement for single stat panel
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
AST parse error when query contains remote #130 - GitHub
I have simple query on single stat panel SELECT toFloat64(sum(bid)) FROM remote('$clickhouse_host', events) WHERE and action_type = 'view' ...
Read more >why is python's parser throwing errors on this simple input?
This is because you're using mode='eval' , which only works for single expressions. Your code has multiple statements, so use mode='exec' ...
Read more >ast - Go Packages
Package ast declares Rego syntax tree types and also includes a parser and compiler for preparing policies for execution in the policy ...
Read more >TPT3291 Invalid assigned value AST node: no column object ...
TPT3291 Invalid assigned value AST node: no column object. The job is terminated. Explanation: A TPT process, task, component or function ...
Read more >Learn Sangria - Sangria - Scala GraphQL Implementation
QueryAnalysisError - signifies issues in the query or variables. This means that client has made some error. If you are exposing a GraphQL...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@hagen1778, @minaevmike look like the latest
master
version works fine with remote() and cluster() functions and template variables inside them I use the following SQL query forremote_host
variable:and following for
cluster_name
I will add these examples to clickhouse_dashboard.json
Thanks for doing this!