grafana / athena-datasource

Apache License 2.0
36 stars 12 forks source link

Docs; Update template variable docs #336

Closed idastambuk closed 1 week ago

idastambuk commented 1 week ago

An issue reported adding variables with custom display values doesn't work in Athena or Redshift: SELECT 'foo' AS __text, 'bar' AS __value

In reality, this isn't a bug but a series of unfortunate events.

  1. Grafana docs were misleading and text and value should be used instead (fixed here)
  2. The values must be a field type string. We could add custom logic for both datasources to parse other field types to string; however some other datasources (bigquery and yugabyte) have opted to not do so and defer to the generic Grafana variable code. This means the users are responsible for writing queries that return a string as value. This update in docs reflects that.