Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Illegal input character "$" in query builder. #215

Closed
SvetoforColumb opened this issue Mar 16, 2020 · 7 comments
Closed

Illegal input character "$" in query builder. #215

SvetoforColumb opened this issue Mar 16, 2020 · 7 comments

Comments

@SvetoforColumb
Copy link

Bug Report

Something went wrong when I made request in query builder with $__timefilter. Time column is in INT64 type, but I transformed it into timestamp with TIMESTAMP_MICROS()

Expected Behavior

$__timefilter macro should replaced with sql

Actual Behavior

invalidQuery: No matching signature for operator BETWEEN for argument types: INT64, TIMESTAMP, TIMESTAMP. Supported signature: (ANY) BETWEEN (ANY) AND (ANY) at [7:21]
invalidQuery: Syntax error: Illegal input character "$" at [7:3]

Steps to Reproduce the Problem

  1. open query editor
  2. do same things as on screenshot

20200316100509-1115x439_edited
20200316100527-976x293_edited

Specifications

  • Version: v.1.0.6
  • Platform: Linux
  • Grafana Version: Grafana v6.3.6 (fdd2117)
@avivl
Copy link
Contributor

avivl commented Mar 16, 2020

The macro only works on time types.

@avivl avivl closed this as completed Mar 16, 2020
@SvetoforColumb
Copy link
Author

The macro only works on time types.

So I can't convert column with TIMESTAMP_MICROS() ?

@avivl
Copy link
Contributor

avivl commented Mar 16, 2020

No, you can't

@SvetoforColumb
Copy link
Author

SvetoforColumb commented Mar 16, 2020

Can you say why, please? I can transform that column to time type in regular query to BigQuery. It happends because I can't use convert functions in macros?

@avivl
Copy link
Contributor

avivl commented Mar 16, 2020

I'm checking against columns that are from time types and not converted ones

@SvetoforColumb
Copy link
Author

Can you add option to use convert functions? Technically query should work if I will convert column type to timestamp (and it works in raw query)

@avivl
Copy link
Contributor

avivl commented Mar 16, 2020

Please open a detailed feature request and I'll take a look

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants