Can influxDB be added to existing data?

Hi

Currently, I am accumulating data with influx DB 2.0.
I would like to add new column data to the same row of data that has already been accumulated.

For example, it has the following format:
The first data is color only.
But I added the value of Value to the same line.
As in the example, I would like to add a new column value to the original data.

(before)
-----------------------------------color
2021/3/11 17:00:00.0000 “red”
2021/3/11 18:00:00.0000 “red”
(after) ↓
----------------------------------color value
2021/3/11 17:00:00.0000 “red” 1
2021/3/11 18:00:00.0000 “red” 0

Is this operation possible?
If possible, please tell me the command to use.

Thanks

Hello @nkanbe,
I believe so. Where is this extra data coming from? Does it have the same/corresponding timestamps associated with it?
If you’re looking to add a value based on the color, then using map with conditional logic will be your best bet:
https://docs.influxdata.com/influxdb/cloud/query-data/flux/conditional-logic/#conditionally-transform-column-values-with-map
Otherwise you might want to union custom rows:
https://docs.influxdata.com/influxdb/cloud/reference/flux/stdlib/experimental/array/from/#union-custom-rows-with-query-results

Please let me know if you need some more detail on either one of these docs.
:)))