mainNodeEntityId field

The mainNodeEntityId field in the entityData table specifies the main node of the entity. This field provides a shortcut to the main node for a particular entity, avoiding the need to traverse the entire containment tree.

The mainNodeEntityId field is relevant only for entities that are wholly contained within a single main node device. It therefore has a non-NULL value only for entities that are related to a single main node device, such as:

  • The main node itself
  • Physical and logical device components, such as interfaces, modules, PSUs, sensors, backplanes, and fans
  • Logical interfaces entities on the main node, such as IP endpoints and VLAN trunk endpoints
  • Local VLANs, which are local VLAN entities contained within a single main node device. The interfaces contained by this VLAN are constrained to only those interfaces contained within the main node device.

Entities that are related to multiple main node devices, such as VPNs and global VLANs, have a NULL value in the mainNodeEntityId field.

To retrieve only the entities that are wholly contained within a single main node device, use an INNER JOIN statement on the entityData table. This statement ensures that only entities that have a non-NULL value in the mainNodeEntityId field are retrieved.