Down sampling data with Flux

Need assistance downsampling and pushing data to a new bucket.

I’m currently collecting telemetry stats from my router. I need to convert octets to BPS. I do this by using the non-negative-derivative function. Then I need to divide by 60 and multiply by 8 to get BPS per minute. I’m able to generate the final output but would like to have it displayed as a separate column with the rest of the data like “interface-name”, “device”, “host”, etc.

This is my query before I divide by 60 * 8:

When I divide by 60 * 8 I get this:

@mohsin106 Use the with operator in your map() call to extend each record with the new column. As you’re currently doing it, you’re rewriting each record with only one column, inBPS.

// ...
  |> map(fn: (r) => ({
    r with
    inBPS: int(v: r._value) / 60 * 8
  }))