Recommended steps for moving a point from one metadata source to another
As the number of metadata functions or points grows, it becomes increasingly desirable to organize them into different metadata sources. What is the best practice for moving the metadata point from OldMetaSource to NewMetaSource, without having to delete and create a metadata point, and without having to export then import a large PointValues table? There is a way to just reassign the point and the PointValue to the new source. What is the step-by-step procedure?
phildunlap last edited by phildunlap
- Stop all the meta points that are to be moved, or more simply the meta data sources.
- Run some variant of the following SQL command, based on how it is easiest for you to describe this set of points:
UPDATE dataPoints SET dataSourceId=(SELECT id FROM dataSources WHERE xid='originMetaSourceXid') WHERE deviceName LIKE '%Device 1 Meta%'; also consider.... WHERE xid IN ('MDP_1', 'MDP_2'); WHERE name='movePoint';
- Enable points that were disabled for the move.
- Enable or restart the second meta source.
Thanks, Phil, that's very useful. It was also insightful of you to note that narrowing down by device name is the most logical way to select the source points to be moved, as renaming the Device Name was probably the first step done by an admin looking to group points within a source that already has many points.