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

Unable to pass Grafana Variables as SQL Predicates #299

Closed
tgtwm1github opened this issue Jan 3, 2021 · 1 comment
Closed

Unable to pass Grafana Variables as SQL Predicates #299

tgtwm1github opened this issue Jan 3, 2021 · 1 comment

Comments

@tgtwm1github
Copy link

Bug Report

In other Data Sources (Postgresql for instance). If I create a variable in Grafana Dashboard. I can pass it as a predicate value.

For example" A variable call "variable1" can be passed in a SQL

select col1,col2 from table1 where col1='$variable1';

I am unable to do that in Bigquery.

However explicit values work.

For instance:

select col1,col2 from table1 where col1='EXPLICIT_VALUE'. <-------This works.

But not having the ability to pass variables is a serious limitation.

Expected Behavior

variables should be able to be passed along as predicates.

Actual Behavior

Steps to Reproduce the Problem

For example" A variable call "variable1" can be passed in a SQL

select col1,col2 from table1 where col1='$variable1';

I am unable to do that in Bigquery.

Specifications

  • Version:2.0.1
  • Platform: Linux
  • Grafana Version: 7.3.5
@tgtwm1github
Copy link
Author

Update:

This is an issue with Date Datatype.
Apologize for not documenting the exact error scenario I faced but trying to provide a similar scenario.
The variable passing works for STRING datatype but does not work for DATE.

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

1 participant