I'm having some issues getting system.tag.queryTagHistory to give me the data 'as-stored' from the database. To my understanding, using -1 for returnSize should give something similar to as-stored, but I'm getting an excess of points returned from my query. For what it's worth, I can change the returnSize and it will scarely ever give me the number I want, even toggling noInterpolation True or False. Maybe that's a hint. Here's the script:
endTime = system.date.now()
startTime = system.date.addSeconds(endTime, -1*durationInSecs)
queryResults = system.tag.queryTagHistory(paths=historicalPaths, startDate = startTime, endDate=endTime, noInterpolation = True, ignoreBadQuality=True, returnSize=-1)
As it stands, the tag history script returns about 460 entries from my last 24h.
I'm comparing my queryTagHistory with the tag history binding and a direct sql query, which both come up with ~230 entries, which I believe is correct. Any obvious 'gotcha's I'm missing here with my script?