Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.
How to move a point from one data source to another?
-
I wonder if someone might provide and a method & explanation on moving a group of points from a modbus IP data source to another modbus IP datasource? I can add datapoints to a datasource through the import but if I wish to remove them from one and create them in another is this even possible? I am prepared to lose the points history and just move the xid, ie. delete and create, so can I delete the points from the datasource without issue?
-
Hi Phillip,
Joel gave some good instructions in this thread: https://forum.infiniteautomation.com/topic/2055/changing-datasource-of-datapoint
I think the only thing he may have left out was to disable the data sources before moving the points, then re-enable them (or just disable and re-enable the points, but that's more clicking)
-
so Phil would this be correct SQL to move points with these names from DS 6 to 10..
update datapoints set DataSourceID = 10 where ((DataSourceID = 6) AND (name = 'FLOW_MIN LPM' OR name = 'FLOW_MAX LPM')); -
That does appear to be valid SQL.
-
this is the result..
org.h2.jdbc.JdbcSQLException: Method is only allowed for a query. Use execute or executeUpdate instead of executeQuery; SQL statement: update datapoints set DataSourceID = 10 where ((DataSourceID = 6) and (name = 'FLOW_MIN LPM' or name = 'FLOW_MAX LPM')); [90002-196] -
Shoot I didn't have the source disabled.. that was not the issue.
so should I use executeupdate instead of update -
You can just disable and enable the points / sources after the fact or at worst restart Mango. That is not why the command failed, it sounds like you are hitting the 'submit query' button instead of 'submit update'. Best practice is disabling before moving.
-
That was it Thank you all good now, Phewf :)