Hi all. Consider the following code:
batch |query('SELECT ("power" * 100), FROM "some_database"."autogen"."data"') .where(lambda: "machine_id" == ####) .period(1m) .every(1s) |log() |influxDBOut() .database('some_database') .measurement('converted_data') .precision('ms') # How do I specify tag set?
Now here is where I am having trouble. I have three tags (which are each unique channels that give the same data readings). Let’s call them a, b, and c. Where a, b, and ,c would be in place for the
"machine_id" == #### However, I need to convert the data that gets received. How can I specify in my tick script that I want to do this conversion on power for all tags independently then dump it to a new for table while preserving the converted data with its corresponding tag? a, b, and c are all streaming data simultaneously. They are tagged and written to the database correctly, but how would I go about querying data given the time period in my script for each tag, and then dump the data to a new measurement but as well as preserving the tag with its corresponding data?
measurement 1: raw_data -> measurement 2: converted_data
Data being sent concurrently:
measurement: raw_data, tag: a, power: 3 -> measurement: converted_data, tag: a, power: 300
measurement: raw_data, tag: b, power: 2 -> measurement: converted_data, tag: b, power: 200
measurement: raw_data, tag: c, power: 5 -> measurement: converted_data, tag: c, power: 500