{"action":"created","issue":{"url":"https://api.github.com/repos/grafana/grafana/issues/5013","repository_url":"https://api.github.com/repos/grafana/grafana","labels_url":"https://api.github.com/repos/grafana/grafana/issues/5013/labels{/name}","comments_url":"https://api.github.com/repos/grafana/grafana/issues/5013/comments","events_url":"https://api.github.com/repos/grafana/grafana/issues/5013/events","html_url":"https://github.com/grafana/grafana/issues/5013","id":154524098,"number":5013,"title":"[Feature Req]: Support SELECT queries in templating query","user":{"login":"ab77","id":2033996,"avatar_url":"https://avatars3.githubusercontent.com/u/2033996?v=4","gravatar_id":"","url":"https://api.github.com/users/ab77","html_url":"https://github.com/ab77","followers_url":"https://api.github.com/users/ab77/followers","following_url":"https://api.github.com/users/ab77/following{/other_user}","gists_url":"https://api.github.com/users/ab77/gists{/gist_id}","starred_url":"https://api.github.com/users/ab77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ab77/subscriptions","organizations_url":"https://api.github.com/users/ab77/orgs","repos_url":"https://api.github.com/users/ab77/repos","events_url":"https://api.github.com/users/ab77/events{/privacy}","received_events_url":"https://api.github.com/users/ab77/received_events","type":"User","site_admin":false},"labels":[{"id":120793231,"url":"https://api.github.com/repos/grafana/grafana/labels/comp:%20dashboard/templating","name":"comp: dashboard/templating","color":"c7def8","default":false},{"id":96414390,"url":"https://api.github.com/repos/grafana/grafana/labels/datasource:%20InfluxDB","name":"datasource: InfluxDB","color":"009800","default":false},{"id":223098243,"url":"https://api.github.com/repos/grafana/grafana/labels/help%20wanted","name":"help wanted","color":"bfe5bf","default":true},{"id":257659118,"url":"https://api.github.com/repos/grafana/grafana/labels/P3:%20important","name":"P3: important","color":"fef2c0","default":false},{"id":81198721,"url":"https://api.github.com/repos/grafana/grafana/labels/type:%20feature%20request","name":"type: feature request","color":"dddddd","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-05-12T16:20:20Z","updated_at":"2017-10-25T14:35:17Z","closed_at":null,"author_association":"NONE","body":"Thank you very much for making this product available (and for free!).\n\nI am having an issue with template variables since upgrading to `v3.0.2` (from `v.3.0.0.-pre1`).\n\n`grafana_3.0.2-1463058303_armhf` with `influxdb_0.12.1-1_armhf.deb` running on `Linux 4.1.21-v7+ #872 SMP armv7l GNU/Linux`.\n- What did you do?\n  Added template variable to a dashboard using query `SELECT last(\"value\") FROM \"geo\"` with regex extraction `([0-9\\.]+,[0-9\\.\\-]+)`.\n\nThe actual query directly from InfluxDB returns:\n\n```\n> SELECT last(\"value\") FROM \"geo\"\nname: geo\n---------\ntime    last\n0       52.439034333,-0.1250985\n```\n\nThe HTTP response from Grafana running this query is:\n\n```\n{\"results\":[{\"series\":[{\"name\":\"geo\",\"columns\":[\"time\",\"last\"],\"values\":[[0,\"52.439021333,-0.125126833\"]]}]}]}\n```\n- What was the expected result?\n  The expected result (was working with `v3.0.0-pre1`) was the displaying of the value as the template variable (e.g. `52.439034333,-0.1250985`).\n- What happened instead?\n  Instead, got `None` as the template variable. If I change the extraction to `(.*)`, the template variable is set to `0`, which is presumably the value in the `time` column.\n\nI suspect Grafana is grabbing the value from the first `time` column or I am doing something wrong...\n\nAny ideas?\n\nCheers!\n"},"comment":{"url":"https://api.github.com/repos/grafana/grafana/issues/comments/339350890","html_url":"https://github.com/grafana/grafana/issues/5013#issuecomment-339350890","issue_url":"https://api.github.com/repos/grafana/grafana/issues/5013","id":339350890,"user":{"login":"kb1lqc","id":331540,"avatar_url":"https://avatars2.githubusercontent.com/u/331540?v=4","gravatar_id":"","url":"https://api.github.com/users/kb1lqc","html_url":"https://github.com/kb1lqc","followers_url":"https://api.github.com/users/kb1lqc/followers","following_url":"https://api.github.com/users/kb1lqc/following{/other_user}","gists_url":"https://api.github.com/users/kb1lqc/gists{/gist_id}","starred_url":"https://api.github.com/users/kb1lqc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kb1lqc/subscriptions","organizations_url":"https://api.github.com/users/kb1lqc/orgs","repos_url":"https://api.github.com/users/kb1lqc/repos","events_url":"https://api.github.com/users/kb1lqc/events{/privacy}","received_events_url":"https://api.github.com/users/kb1lqc/received_events","type":"User","site_admin":false},"created_at":"2017-10-25T14:35:17Z","updated_at":"2017-10-25T14:35:17Z","author_association":"NONE","body":"Any suggestions on formatting a tag to hold multiple text values for templating? I assume I can use regex to parse between deliminators and make one tag per unique entry? Basically I want to use templating queries to pull chart names from the database. So one entry would have something like \"chart1,chart2,chart3\" and then I could label each grafana chart with each name."}}
{"actor":{"display_login":"kb1lqc"}}