Copy data with SELECT INTO and current time

Hello all,

i searched hard for the last few days for a solution to my problem. I have a time series which very seldom writes new entries to the db. But my application (grafana) expects a lot more often updated values. So i want to copy the latest values of my db to a new database with a script which runs periodically. This is working fine the only issue is, that also the timestamp is copied. But what i need is, that the timestamp is dropped and the current time is used. For this i want to use CLI. I am currently running this command:

SELECT time, floor, room, itemtype, item, value INTO "test_db"."autogen".:MEASUREMENT FROM "orig_db"."autogen"./.*/ GROUP BY * ORDER BY DESC LIMIT 1

Is there any possibility to enter the values and tags with passing the current time stamp and not the one of the orig_db?

Thx in advance,

You might be able to simply write the point without using copy. When Influx encounters duplicate points, it does an override and replaces the timestamp. Would something like that work for you? I don’t know if this helps with your Grafana issue