Data type change via upload
-
Is it advisable to change data type via a csv/json upload. When you do it manually you need to acknowledge that the points will be lost. I have quite a few to change, thought I will ask before I upload...
-
Hi CraigWeb,
It would depend on what you mean by data type.
For instance, if I have a virtual data point and I change its JSON from
{ "dataPoints":[ { "xid":"DP_598cc586-1c01-4edb-ae95-e91b3edf02a2", "name":"Example", "enabled":false, "loggingType":"ALL", "intervalLoggingPeriodType":"MINUTES", "intervalLoggingType":"AVERAGE", "purgeType":"YEARS", "pointLocator":{ "dataType":"NUMERIC", "changeType":{ "type":"NO_CHANGE", "startValue":"0" }, "settable":true }, "eventDetectors":[ ], "plotType":"SPLINE", "rollup":"NONE", "unit":"", "templateXid":"Numeric_Default", "simplifyType":"NONE", "chartColour":"", "chartRenderer":{ "type":"IMAGE", "timePeriodType":"DAYS", "numberOfPeriods":1 }, "dataSourceXid":"DS_9a8d6d68-d97e-4e20-8de0-7ef8afa905d7", "defaultCacheSize":1, "deviceName":"Virtual", "discardExtremeValues":false, "discardHighLimit":1.7976931348623157E308, "discardLowLimit":-1.7976931348623157E308, "intervalLoggingPeriod":1, "intervalLoggingSampleWindowSize":0, "overrideIntervalLoggingSamples":false, "preventSetExtremeValues":false, "purgeOverride":false, "purgePeriod":1, "readPermission":"", "setExtremeHighLimit":1.7976931348623157E308, "setExtremeLowLimit":-1.7976931348623157E308, "setPermission":"", "tags":{ }, "textRenderer":{ "type":"ANALOG", "useUnitAsSuffix":true, "unit":"", "renderedUnit":"", "format":"0.00" }, "tolerance":0.0 } ] }
to
{ "dataPoints":[ { "xid":"DP_598cc586-1c01-4edb-ae95-e91b3edf02a2", "name":"Example", "enabled":false, "loggingType":"ALL", "intervalLoggingPeriodType":"MINUTES", "intervalLoggingType":"AVERAGE", "purgeType":"YEARS", "pointLocator":{ "dataType":"MULTISTATE", "changeType":{ "type":"NO_CHANGE", "startValue":"0" }, "settable":true }, "eventDetectors":[ ], "plotType":"SPLINE", "rollup":"NONE", "unit":"", "templateXid":"Multistate_Default", "simplifyType":"NONE", "chartColour":"", "chartRenderer":{ "type":"IMAGE", "timePeriodType":"DAYS", "numberOfPeriods":1 }, "dataSourceXid":"DS_9a8d6d68-d97e-4e20-8de0-7ef8afa905d7", "defaultCacheSize":1, "deviceName":"Virtual", "discardExtremeValues":false, "discardHighLimit":1.7976931348623157E308, "discardLowLimit":-1.7976931348623157E308, "intervalLoggingPeriod":1, "intervalLoggingSampleWindowSize":0, "overrideIntervalLoggingSamples":false, "preventSetExtremeValues":false, "purgeOverride":false, "purgePeriod":1, "readPermission":"", "setExtremeHighLimit":1.7976931348623157E308, "setExtremeLowLimit":-1.7976931348623157E308, "setPermission":"", "tags":{ }, "textRenderer":{ "type":"ANALOG", "useUnitAsSuffix":true, "unit":"", "renderedUnit":"", "format":"0.00" }, "tolerance":0.0 } ] }
where I am changing the templateXid (so that the other properties will be set to valid values) and the dataType, I should expect all the point history to be purged. This happens whenever a point changes amount the Mango data types, Binary / Multistate / Numeric / Alphanumeric / Image. In Modbus, though, many data types ultimately resolve back to being Numeric, for instance. So if you change a modbusDataType between a
TWO_BYTE_INT_UNSIGNED
and aTWO_BYTE_INT_UNSIGNED_SWAPPED
you would not purge all data for the point, but if you changed it toCHAR
you would.So, we just advise you be careful since it can purge data without asking if you're really sure.
-
Hi Phildunlap,
Thank you for the response. I have a whole lot of meta data points used to scale a value, which are alphanumeric. I want to change to numeric. Not to worried about losing data. Just wanted to make sure It is safe to do a bulk update with out anything else going wrong.