Ignition Historian Import

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:

  1. 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)
  2. used sed to replace each 100x number with the correct tagID that existed for the same tag in the new system
  3. Copied the create table structure for the old data that didn’t exist in my historian (i.e. sqlt_data_1_2017_11)
  4. 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.
  5. Inserted new rows into the sqlth_partisions to match the new tables and copied over the start_time / end_time from the old server
  6. 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?

I think this is the only way to do it. We had to do the same recently when we tidied up the tag structure in a customer’s system and wanted to link existing historical data to the new tags.

An import facility in an Ignition window that showed you a list of old and new tags, let you link them together and them carried out the import process automatically would be very nice. If we ever get round to creating this we’ll let you know :slight_smile:

2 Likes

Curious if you ever got around to creating this? We seem to be doing this more and more often for various reasons and would be nice to have something a little less tedious.

We did, at least to the extent of being able to use it for the particular project we were working with. The customer had renamed some tags several times before realising this meant he was losing access to the historical data. This, plus wanting to rearrange the tag structure of the project meant we were dealing with years of data for thousands of points.

It was a huge time saver to be able to interactively select an ‘orphaned’ data point from a list and copy all of its data to a ‘live’ tag in another list. From memory the main issue was deciding what to do when data ranges overlapped. We used the Status chart control to visually display what was happening with the data ranges.

1 Like