I have an old ignition system that I’m transferring over to a new Ignition server and I want to bring the historian data with it. I had the tags set up already to the new historian so here are the steps I did:
- Used a command called “sed” in Linux to add the number 100 to the beginning of each line (this way as I updated the tagIDs I was guaranteed to not have any overlaps as tagID 1001 was way outside my historian range)
- used sed to replace each 100x number with the correct tagID that existed for the same tag in the new system
- Copied the create table structure for the old data that didn’t exist in my historian (i.e. sqlt_data_1_2017_11)
- took the resulting csv from the and used the MySQL function “LOAD DATA” to import in the old data to match my new tag names.
- Inserted new rows into the sqlth_partisions to match the new tables and copied over the start_time / end_time from the old server
- Where the new server met up with the old server, I made sure the data landed in the correct table according to the start/end times for that table.
The problem is I’m not seeing the older data in the historian…and I just realized, the problem is the created value in the sqlth_te table isn’t it? If I updated it to be when it was first created in the old database Ignition would start displaying it.
Is there an easier way to get csv data into the Ignition historian?