influxdata / influxdata/influxdb

Loop through an array of scalar values

Open
#21,986 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

Hi, I’m trying to loop through an array of scalar values. From InfluxDB document [Extract scalar values in Flux](https://docs.influxdata.com/influxdb/cloud/query-data/flux/scalar-values/#sample-data), if we use the `findColumn` method, it will return an array of scalar values. I have tried to access the elements of the array by arr[idx]. Is there any way to loop through the array because we don’t know its length?
![Screenshot from 2021-07-30 14-25-56](https://user-images.githubusercontent.com/42259411/127671834-009933e0-72c3-4aa2-a255-d4d5f90de5b7.png)

Contributor guide

Open the contributing guide

Research direction

Start with the linked InfluxDB documentation page, especially the “Extract scalar values in Flux” sample and the `findColumn` usage. Determine whether the documentation explains iteration over an array of scalar values without a known length; done means the relevant guidance or limitation is clearly documented.

Written by the indexing model from the issue text.

Assessment

Domain
databases
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.