Need to import iFIX iHistorian Data

History was configured in 1 week partitions. Do I have to maintain that table interval? Can I dump 10 minute average data into a year partition? I am trying to reduce the amount of manual conversion tasks - 1 year is better than 52 weeks.

No, Ignition would be able to use whatever table size you specify. The range of data (as well as the table name) is defined in sqlth_partitions.

Should be able to do SQL BULK INSERT from CSV. Is there a better way?

Importing the data directly into the database may not be the best option - there will be almost certainly be manipulation required to get the table structure to line up with what Ignition expects.

What advice on automating this conversion?

There's three basic steps behind adding old data into the historian.
First is matching the actual data table structure - so a tagid, timestamp, separate columns for float, int, string, and a quality code. If you have raw data already, then the CSV import @mazeyrat linked above would be a good starting point.
The second step is creating the additional rows in sqlth_partitions necessary to define the range of data your new tables hold. You'll need to match up drv_ids, enter correct start and end times, and enter the table names.
The final step, probably the most complex, is matching the tagids from sqlth_te with however the tags were identified in the old data. There's no certain way to do this - you'll have to query sqlth_te for each active tag instance (WHERE retired IS NOT NULL) and match the Ignition tag names and paths with the tags from your old system. Then the data tables you're dropping in will need the same tagids.

1 Like