Or how do I tell if a field in the nodes table is a custom property?
Thanks,
Daniel
Once you are on NPM 11.5 or later, the traditional Nodes table is split up into 3 different tables in the database (NodesCustomProperties, NodesData, and NodesStatistics). These 3 tables are combined into the dbo.Nodes view in order to retain functionality for everyone who has been historically using the Nodes table for things.
In the SWQL Studio, you should be able to see a similar breakout within the Orion.Nodes, Orion.NodesCustomProperties, and Orion.NodesStats tables.
-ZackM
Loop1 Systems: SolarWinds Training and Professional Services
Thanks for the explanation ZackM. In our instance the Orion.Nodes has become Orion.NodesOld and the rest are exactly what you said.
Now have a basic question - how do I extract all the field names from Orion.NodesCustomProperties and NodesData tables? Is there a SWQL syntax for that?
In general, you can query for the properties of any entity type by querying Metadata.Property, like this:
SELECT NameFROM Metadata.PropertyWHERE EntityName='Orion.NodesCustomProperties'
However, this will include navigation properties and inherited properties like Uri and InstanceType that you probably aren't interested in. You can include those like this:
SELECT NameFROM Metadata.PropertyWHERE EntityName='Orion.NodesCustomProperties' AND IsNavigable=false AND IsInherited=false
That will give you the list of the names of the actual custom properties on nodes, plus one extra item: NodeID. You can exclude that with one more clause:
SELECT NameFROM Metadata.PropertyWHERE EntityName='Orion.NodesCustomProperties' AND IsNavigable=false AND IsInherited=false AND Name != 'NodeID'
Thanks for the excellent information Tim