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

2.0.0-alpha19: Mapped variables use the key instead of the mapped value in queries #15942

Closed
ginoledesma opened this issue Nov 15, 2019 · 2 comments

Comments

@ginoledesma
Copy link

ginoledesma commented Nov 15, 2019

Steps to reproduce:

  1. Create a new variable called Resolution of type map. For example, using the CSV format:
a.10 seconds,"10s"
b.30 seconds,"30s"
  1. Create a Flux query that references this variable
from(bucket: "telegraf")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r._measurement == "cpu")
  |> filter(fn: (r) => r._field == "usage_user")
  |> filter(fn: (r) => r.cpu == "cpu-total")
  |> map(fn: (r) => ({r with _variable: v.Resolution}))
  1. View the results using the Raw Data format

Expected behavior:
The _variable field should display the mapped value (10s)

Actual behavior:
The _variable field shows the key of the variable (a.10 seconds)

Environment info:

  • System info: Linux 4.15.0-1052-aws x86_64
  • InfluxDB version: 2.0.0-alpha.19 ce3e296 2019-10-30T23:33:54Z
@ginoledesma
Copy link
Author

Bug still present in 2.0.0-alpha20 and 2.0.0-alpha21

@asalem1
Copy link
Contributor

asalem1 commented Mar 5, 2020

Duplicate of #17026 - fixed in this PR:

#17072

@asalem1 asalem1 closed this as completed Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants