Hello,
I have started to use Influxdb 2.0 and read Flux documentation that is avalable. But I am stuck on what would be equivalent flux query for SELECT username FROM Planning
?
Below is my measurement data csv equivalent content:
#datatype measurement,tag,tag,tag,tag,double,double
Planning,Month,SprintName,Duration,username,Planned_Est_Efforts,Expected_Est_Efforts
Planning,Jun,Sprint 1,2 Weeks,abcd,64.23,72
Planning,Jun,Sprint 1,2 Weeks,xyz,65,72
In the flux Documentation present filter()
function is the equivalent of both SELECT
and WHERE
clauses, but examples given are equivalent of WHERE
clauses, and I could not find on SELECT
.
Can please some one tell me how can i extract values of a particular field. In this example : I would like to get all values of username.
Query :
from(bucket: "Sprint")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "Planning" )
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|> yield(name: "mean")
Thank You in Advance!