Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change InfluxDB SQL generation template to wrap column names in quoutes #369

Merged
merged 1 commit into from Apr 30, 2014
Merged

Change InfluxDB SQL generation template to wrap column names in quoutes #369

merged 1 commit into from Apr 30, 2014

Conversation

jbripley
Copy link

Since column names can contain dots or dashes, which will give syntax errors from InfluxDB API, unless wrapped in quotes.

Since column names can contain dots or dashes, which will give syntax errors from InfluxDB API, unless wrapped in quoutes
torkelo added a commit that referenced this pull request Apr 30, 2014
Change InfluxDB SQL generation template to wrap column names in quoutes
@torkelo torkelo merged commit e3d7e3c into grafana:master Apr 30, 2014
@jbripley jbripley deleted the influxdb-columnname-escape branch April 30, 2014 08:34
@torkelo
Copy link
Member

torkelo commented Apr 30, 2014

Thanks! This should solve issue #348

@mavimo
Copy link
Contributor

mavimo commented Apr 30, 2014

This totally break InfluxDB:

marco@nebula ~/Development/grafana   $ influxdb -v
InfluxDB v0.5.8 (git: 1b2bca57041e583930f84d66d633d7ff3cf38ace) (leveldb: 1.15)

With quoted query:

http://localhost:8086/db/test/series?p=root&u=root&q=select+count(%22statuscode%22)+as+%22statuscode_count%22+from+accesslog+where++time+%3E+1394948146s+and+time+%3C+1394991671s+group+by+time(30s)+order+asc

generate:

syntax error, unexpected $undefined

             ^

without double quote it work as expected

@jbripley
Copy link
Author

Oh, I've only tested this fix with InfluxDB 0.5.9 and later (0.5.11 specifically). It's unfortunate that earlier versions break when sent this syntax and I'm a bit surprised since this was the solution suggested by the InfluxDB devs.

The only option I see is making the column name quoting configurable, to handle earlier InfluxDB versions.

@torkelo
Copy link
Member

torkelo commented May 1, 2014

Not good... hmm is there a http api to query influxdb version? Might be good to have a version check at application boot to feature toggle some features.

Dieterbe pushed a commit to Dieterbe/grafana that referenced this pull request Aug 11, 2015
Removed event dash title from panel and moved it into row
@ying-jeanne ying-jeanne added the pr/external This PR is from external contributor label Apr 30, 2021
dsotirakis added a commit that referenced this pull request Jun 15, 2022
* Docs: Manual backport of alert list panel docs rewrite (#50512)

* Updating migration docs to include most relevant breaking changes (#50356) (#50515)

(cherry picked from commit cd01eb5)

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>

* ReleaseNotes: Updated changelog and release notes for 9.0.0-beta2 (#50398) (#50521)

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
(cherry picked from commit a6943cb)

* Alerting: Fix force_migration when alerting is disabled (#50431) (#50481) (#50565)

This pull request fixes a bug where force_migration must be set to true when both unified and legacy alerting is disabled.

(cherry picked from commit c312188)

* [release-v9.0.0] Grafana UI: Fix nonexistent indexof module for plugin tests (#50573)

* Grafana UI: Fix nonexistent indexof module for plugin tests (#50529)

* fix(grafana-ui): prevent module resolution failure where component-indexof appears as indexof

* chore(grafana-ui): update comment explaining need for alias plugin

(cherry picked from commit 6a4906e)

* chore: refresh yarn.lock

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>

* [release-v9.0.0] Grafana UI: Put back production build in rollup config (#50581)

* Grafana UI: Put back production build in rollup config (#50575)

(cherry picked from commit 2d1ab27)

* chore: refresh yarn.lock

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>

* [release-v9.0.0] Alerting: use "find" to wait for expression editor to load (#50604)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>

* Docs: Backport 49739 to v9.0.x (#50123) (#50614)

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 49b20ad)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Alerting: improve provisioning docs (#50347) (#50619)

* Alerting: improve provisioning docs

* add new provisioning page

* add api docs

* fix formatting and add better descriptions

* fix typo

(cherry picked from commit 862f512)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>

* Backport docs changes for Grafana Alerting (#50620)

* doc fix (#50624) (#50627)

(cherry picked from commit 336c9fd)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>

* RBAC: Inheritance permission migration should handle empty managed roles (#50611) (#50622)

* Make inheritance permission migration more robust

* Better fix

* Add more tests to the migration

* Add removed test case

* Add test case for empty role in empty org

* Handling the role.ID 0 case with a log

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
(cherry picked from commit 307a0d4)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* "Release: Updated versions in package to 9.0.0" (#369)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/external This PR is from external contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants