It can be done manually by inspecting a combination of the sql tables managed by the historian module – I would suggest taking a quick look at the SDK reference for these tables to better understand how they function: https://docs.inductiveautomation.com/display/SE/Tag+History+Tables+Reference
Generally – you will need to inspect the following (names/etc may not be exact – going from memory here…)
- sqlth_te (find the id of the tag based on it’s TagPath within the historian db)
- sqlth_partitions (find the data table(s) for the time-range you’re after)
- sqlt_data_x_x_x (this is the table returned for your time-range in question…use the “WHERE” clause to filter entries pertaining to your specific tag id)
Hope this helps!
PS – I think there is a more elegant way of doing this via the PI RDBMS interface – but I’m assuming you’re trying to fill the missing data that may have been captured via OPC-UA connector?)