1 of 1 people found this helpful
Since the value of Pt Created is in the middle of the tag's events there is no simple way to do this.
The easiest tool I can think of is PI SQL products (OLEDB Provider or ODBC)
Refer to: Snippet / Delete all PT - Created Values from Snapshot/Archive . in particular by Alex & Mathieu (Jan 16, 2012 3:52 PM) where they talk about the SQL query.
delete from piarchive..picomp2 where tag = 'Sample Tag' and status = -253
here -253 here is the Digital State of "PT Created" from the SYSTEM digital state set.
Note: DO NOT use the PI SDK snippet shown as it only checks snapshot values.
Not feasible for 1000 tags but another method.
You could use PI SMT and filter for Digital State value "Pt Created" using Data -> Archive Editor.Then you can easily delete it from SMT.
Here I am showing Intf Shut but you can use a similar filter for Pt Created
All the above queries are expensive. Any other programmatic method would involve first determining where the value occurs by going through the archive events and checking each value(filtering) and then deleting Pt Created.
2 of 2 people found this helpful
There are some code samples in the KB article below that may help you:
In particular, the powershell snippet in the section 'Deleting archive events with a specific digital state value within a time range' will be useful, you should be able to iterate through the tags in question and delete the values. Just be sure to remember to change the digital state value from -254 in the example to 253 in your case.
The above assumes that you are already collecting data and that the Pt Created value is not the snapshot value any more. If you are only backfilling, and have not written current data to the tag, then you may also be able to just delete the Pt Created event from the snapshot as outlined in the section 'Deleting the current snapshot event'.
Hope that helps, as a final note, our standard recommendation when deleting data is always that you make sure that you backup your data before starting, just in case you accidentally delete data that you might want.
Michael Tippett's suggestion is a nice way to delete the value.
Just a note of caution, all these methods involve retrieving the events over a time range, checking(filtering) each of the values and then deleting them.
Since you have a large number of tags, please exercise caution so as to not burden the archive by running it all at the same time.
1 of 3 people found this helpful
Open PI-SMT, go to points and then point builder, search for your tag. Once you have found the tag that you want to remove, right click and select "Delete PI point".
Please accept my apologies but I don't believe your suggestion is useful. Deleting a PI Point will remove the 'Pt Created' event but make the point including historical values unavailable. Re-creating a deleted PI Point including its history is possible but after doing this, all the historical events will be available again, including the 'Pt Created' event meaning the situation will not have changed.
Did you maybe misunderstand the ask?
You might be right, I may have misunderstood the question in the first place.
You can use PI DATA LINK for search tag with PT CREATED Status. After you can use SMT for delete.
Normally I use my AFSDK example tool to delete specific events.
It works for me. From this tool, I can type "Pt Created" in the Specific Events text box.
Remember that it is not official tool.... just an example.