Tag Historian SQL intvalue and floatvalue Columns

We have tag history configured on a gateway utilizing the Historian module and we now have a 3rd party vendor that wants to read some data from the tables.

They have set up a query to read from the floatvalue column, but some of the tag values that they want to read are integer tags so the data is in the intvalue column.

I would assume that the column that is used by the historian is dependent on the Ignition tag's datatype?

I have concerns about blindly converting this integer tag to a float. What are my options?

Read the historian metadata table to determine which column applies. Encourage them to batch their reads by datatype so no (potentially lossy) conversion would be needed.

Even better would be to set up a WebDev API that queries the history for them.

I've not really messed with these tables all that much. I would assume that there's a column for "type" in the metadata table that they can read to figure out the type? Then, that query would have to be combined with another?

A join would do.

1 Like