Hi Folks,
A part of my project wants me to stream data from one table and match the obtained value with another table to get the corresponding message. Then join the data and store it in a third table.
I am using InfluxDB as my database. In InfluxDB I have a table called ErrorMessage and another table called ProcessData. In the ProcessData table, I have a field called ErrorCode which has a corresponding integer value under the field Value. The ErrorMessage table has all the possible error codes and the respective error message. Now I want to stream Value from the ProcessData table and find the corresponding error message from the ErrorMessage table. Then I want to store the result in another table called ErrorLog.
This is how the ProcessData table looks:
=====================================================
|timestamp |Field |Value |
=====================================================
|123456789 |ErrorCode |2 |
|123456788 |ErrorCode |4 |
|123456787 |ErrorCode |6 |
|123456786 |ErrorCode |8 |
=====================================================
The ErrorMessage looks like this:
=============================================
|timestamp |ErrorCode |Message |
=============================================
|123456789 |1 |Msg_1 |
|123456788 |2 |Msg_2 |
|123456787 |3 |Msg_3 |
|123456786 |4 |Msg_4 |
|123456786 |5 |Msg_5 |
|123456786 |6 |Msg_6 |
|123456786 |7 |Msg_7 |
|123456786 |8 |Msg_8 |
|123456786 |9 |Msg_9 |
|123456786 |10 |Msg_10 |
=============================================
The ErrorLog table should look like this:
=============================================
|timestamp |Value |Message |
=============================================
|123456789 |2 |Msg_2 |
|123456788 |4 |Msg_4 |
|123456787 |6 |Msg_6 |
|123456786 |8 |Msg_8 |
=============================================
How am I supposed to achieve this using tick-script?
Thanks in advance.
Cheers, SD