Hi Team,
Is there a way that I can only capture the data that's changed in the offload database.
For few tables like Alarm and Info I can use Creationtime to see when a new record is inserted and I can use that column to get a mysql dump with a condition .
But for tables like data or dataavg how is the data being offlaoded. There is no way that I can find when a record in inserted with ingestion time. So, is there a way to find the new record insertions. I tried to alter the table and add a new column adding the current timestamp when there is a new record inserted, but its not adding the ingestion time rather inserting NULL values.
Please suggest if there is an option to capture the changes made to the offload database.
Thanks in Advance.
Sounds like you want a trigger after an update on the table. Triggers perform actions every time a certain event happens: You can find more information on how to set this up here - https://dev.mysql.com/doc/refman/8.0/en/trigger-syntax.html
You could do something like write the current timestamp in a new table with a foreign key link to the other table, or something like that whenever the trigger occurs. Then you can do a join when querying the data to get the timestamp. There are a number of choices in how you could so this.
Hi Simon,
I tried that but not showing any sign of adding the current timestamp to the new records. There will be new records ingested continuously. I want a column with the timestamp for the new records, there wont be any change in the old records.