I am new on this DB world, so sorry for dumb question. I have an influx database with several temperature measurements with different device and id. I need to merge them into one:
home2.autogen/temperature/device/devicename1/id0
need to copy data to
home2.autogen/temperature/device/devicename2/id0.
I was able to copy the whole table with INTO, but I don’t know how to declare the destination into specific tags and fields.
Hello @djsomi,
Welcome!
Thanks for your question. Are you looking to do a join perhaps? You can perform joins with Flux. What version of influxdb are you using? You’ll have to use at least 1.7.6 to enable flux. I recommend taking a look at this example in the spec and this blog for examples on how to perform a join in influx
It’ll end up looking something like
join1 = join(tables: {t1: table1, t2: table2}, on: ["_time", "_field"])
join2 = join(tables: {t3: table1, t4: table2}, on: ["_time", "_field"])
join_final = join(tables: {j1: join1, j2: join2}, on: ["_time", "_field"])