-
Notifications
You must be signed in to change notification settings - Fork 34
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
[BUG] Double Quote Inclusion Around Measurement Names #22
Comments
I'm not quite sure if I get you right (s. Line Protocol Tutorial: "Do not double or single quote measurement names, tag keys, tag values, and field keys. It is valid Line Protocol but InfluxDB assumes that the quotes are part of the name."). Therefore, could you please propose a PR with all relevant code changes? Thanks! |
When it comes to changes, I'm pretty useless :) Measurements with Special CharactersErroneous Queries> influx_select(con, "dbdata", measurement = "tag/value", field_keys = "*", limit = 100L)[[1]]
NULL
Warning message:
http: error parsing query: found /, expected ; at line 1, char 18
> influx_select(con, "dbdata", measurement = 'tag/value', field_keys = "*", limit = 100L)[[1]]
NULL
Warning message:
http: error parsing query: found /, expected ; at line 1, char 18
> influx_select(con, "dbdata", measurement = "'tag/value'", field_keys = "*", limit = 100L)[[1]]
NULL
Warning message:
http: error parsing query: found tag/value, expected identifier at line 1, char 14
> influx_select(con, "dbdata", measurement = "\'tag/value\'", field_keys = "*", limit = 100L)[[1]]
NULL
Warning message:
http: error parsing query: found tag/value, expected identifier at line 1, char 14
> influx_select(con, "dbdata", measurement = sQuote(dQuote("tag/value")), field_keys = "*", limit = 100L)[[1]]
NULL
Warning message:
http: error parsing query: found ‘, expected identifier at line 1, char 15
> influx_select(con, "dbdata", measurement = sQuote("tag/value"), field_keys = "*", limit = 100L)[[1]]
NULL
Warning message:
http: error parsing query: found ‘, expected identifier at line 1, char 15
> influx_select(con, "dbdata", measurement = dQuote("tag/value"), field_keys = "*", limit = 100L)[[1]]
NULL
Warning message:
http: error parsing query: found “, expected identifier at line 1, char 15 Working Queries> influx_select(con, "dbdata", measurement = '"tag/value"', field_keys = "*", limit = 100L)[[1]] Suggested FixMy guess is that because measurement names can have special characters in influx (e.g. Tag Keys with Special CharactersErroneous Queries> influx_select(con, "dbdata", measurement = "data", field_keys = "L1BP,L1BV,L1AP,L1AV", where = 'symbol='tag/value' and time >= now() - 2d', limit = 100L)[[1]] Working Queries> influx_select(con, "dbdata", measurement = "data", field_keys = "L1BP,L1BV,L1AP,L1AV", where = "symbol='tag/value' and time >= now() - 2d", limit = 100L)
### AND
> influx_select(con, "dbdata", measurement = "data", field_keys = "L1BP,L1BV,L1AP,L1AV", where = 'symbol::tag=\'tag/value\' and time >= now() - 2d', limit = 100L)
### AND
influx_select(con, "dbdata", measurement = "data", field_keys = "L1BP,L1BV,L1AP,L1AV", where = 'symbol=\'tag/value\' and time >= now() - 2d', limit = 100L)[[1]] Seems it's much easier to find a working set of quotes for your package when dealing with tag values with special characters. |
Measurements are now double quoted in
Setting Let me know if this works out. |
Is it possible for you to include a double quote around the names of
measurements
? When the measurement has special characters, the string needs to be sent as a literal, in which case I have to wrap all of themeasurements
with:paste0('\"',x,'\"')
I don't believe this causes issues for
measurements
without this need, so it would just be a relief in the case where .!@#$%^&*(/ are used in a name.The text was updated successfully, but these errors were encountered: