Related to my other thread, I am at a point where I am ready to start importing the data exported from Rockwell Historian OSI PI. I have all ~1850 tags imported, but when I look at the sqlth_te table in the database, I see there’s only 1711 tags and I realize that it doesn’t actually get inserted into the table until it has valid data. Unfortunately, several data sources are offline and I can’t say when they will be back online. If the tag doesn’t exist in the historical database, I can’t import the data since it needs to reference the tagid. So I’m a bit stuck at the moment. Do I need to import them all as memory tags so that they get initialized in the database, and then re-import them as OPC data sources so they can have actual data sources? Hopefully I explained that well enough.
You shouldn't be importing data by writing directly to historian tables, you should be using system.tag.storeTagHistory or the corresponding system.historian.storeDataPoints function if you're on 8.3. Then you just specify a path, because the "tagid" is an implementation detail of the SQL based historian, not an artifact of the tag.