0

Views API /getTagData2 Null Values reported on <Extended> Good quality Tags

I have noticed that when querying a tag using /getTagData2 in Canary Views, when a tag has an extended timestamp in the historian, it is returned with the extended quality code, but a null value. Is this expected? It would seem like the extended quality should be maintained, but with the previous value field as shown in historian views.

3 replies

null
    • smason
    • 8 days ago
    • Reported - view

    Hi ,

    What version of Canary is running? I can somewhat reproduce what you're explaining but not exactly. In my call, I'm retrieving raw data and using the includeBounds parameter. When I do that, I get the time-extended value with its corresponding time-extended quality. My null value appears after this because I'm using an endTime of "now" and the Historian does not have a value at or beyond this timestamp. Here is my call and response:

    If I set "includeBounds" to false, it doesn't return either the time-extended value or the null.

      • System Engineer | CSE ICON
      • davin_ross
      • 8 days ago
      • Reported - view

       You've said it in a way better than I did, Steve! 
      Yes, that is correct. If there is only an extended value within the range, and I set the end time to now, it'll give me extended time quality with null value. I am on 25.3.1.

      Maybe this is expected behavior, but I would imagine providing the extended quality code is sufficient for the end application or users to know that this is Canary extending out and that no updated value has been reported by the data source. Would it make more sense to include the value instead of null? Or is it on the client to go back to whatever the previous timestamp was to return that value? 

      I ask because this is affecting other third-party collectors such as alarm management systems where they rely on Canary data for alarm trending. If the value is null in their case, they are assuming there is a data issue. Now, you could argue that it is a problem with how consuming Canary data via the API should account for null data and go back to request earlier data if there, but you could also argue that puts additional load on the query complexity and response handling. 

      Just my two cents.

    • smason
    • 8 days ago
    • Reported - view

    Do they just need the last value or do they need a range of values? If they just need the last value, then you don't need to pass in a "startTime" and "endTime" at all and it will return the last value. You wouldn't get a null value in this case. By default, it will return the time-extended value and timestamp unless you pass in the "useTimeExtension" or "quality" parameter.

Content aside

print this pagePrint this page
  • 8 days agoLast active
  • 3Replies
  • 32Views
  • 3 Following