When setting a range and step what will result in multiple samples for that range, only one row is being created and its fields overwritten for every sample.
This pr moves the creation of the row within the loop that pulls the sample data as well as appending after each row is filled in.
Lastly uses of sample.Timestamp.Time() are replaced with sample.Timestamp.Unix() since that is more closer to the output from the api. Might be worth hooking into slings datetime formatting options, but im not yet familiar enough with sling-cli to know how to do that.
When setting a range and step what will result in multiple samples for that range, only one row is being created and its fields overwritten for every sample.
This pr moves the creation of the row within the loop that pulls the sample data as well as appending after each row is filled in.
Lastly uses of
sample.Timestamp.Time()
are replaced withsample.Timestamp.Unix()
since that is more closer to the output from the api. Might be worth hooking into slings datetime formatting options, but im not yet familiar enough with sling-cli to know how to do that.