What do you mean disappeared? Was there historical data before you called CreateConfig, and now it's gone? If so, please refer to:
I question the use of pointtype=Float64. I'd recommend changing that to Float32.
After I looped through the whole CSV file, and update the value using UpdateValue, data was there.
But when I checked after some time, I only found the last data point in the PITag.
Tell me more about your CSV file.
I presume each row begins with a timestamp in the first column. What does the timestamp string look like? Is it local or does it have timezone info in the string? Is your dtDateTime variable a DateTime or AFTime object? If it's a DateTime object, have your correctly set the Kind?
Could you show a few sample rows of your CSV? By all means obfuscate the attribute or tag names if you must.
Granted your code snippet is Psuedo-Code, but I don't see where you set columns. You use index variable [i] for each row to set the attribute as well as value. Where's the column index set?
It could also help if you could post the actual relevant code.
Here are some rows from my CSV file
Time is in DateTime format, local time zone. i stands for row number
value contains all column of row
For each row(i)
While creating the Elements...
AFElement myElement = myDB.Elements.Add(value); //value-> bus1,bus2...
For each column of CSV (j-> 2 to 4)
//Creating the PI point...
var dtDateTime = DateTime.ParseExact(value, “yyyy-MM-ddTHH:mm:ssZ”, System.Globalization.CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind);
AFAttribute myAttribute = myElement.Attributes[j-2];
myAttribute.Data.UpdateValue((new AFValue(value[j], dtDateTime)),AFUpdateOption.Insert); //value[j]-> attribute values .e. 8.95,37.96
1 of 1 people found this helpful
PI Archive Subsystem doesn't have a target for the data you are sending if there is no archive registered covering the event timestamps. This is a common issue where you would see the data flowing e.g. using at a trend in PI ProcessBook but afterwards disappearing. In this scenario PI ProcessBook receives its updates through a sign-up with PI Update Manager for snapshot updates. The data is received by PI Network Manager, processed by PI Snapshot Subsystem which shares the "news" with PI Update Manager to allow efficient client updates. However, PI Archive Subsystem needs to drop the events with no archive file online and this is why you would see the values disappearing e.g. when refreshing the display.
Can you please verify if the above described scenario is what you are experiencing?
Yes @gregor, this could be the issue, but then why I am able to upload the data through Pi web API's. Same data I am able to upload through Pi web API which contains data older than PI Archive registered date.
Without an archive file online, covering the times you backfill for, events will be available when processed through PI Snapshot subsystem but they will disappear afterwards. There is no difference what Developer Technology you are using to backfill the data. The only thing which may cause a difference when using PI Web API is that PI Web API timestamps are always UTC.