Looking for some help if it is possible to trigger the following SQL query via the SDK. I keep finding nodes that do not have the hardware sensors enabled, and thinking might be beneficial to routinely run this in order to try to keep up. Preference is to utilize Python, just not sure how to 'translate' this query into something that the API's can use.
INSERT INTO dbo.[NodeSettings] (NodeID, SettingName, SettingValue)
SELECT
n.NodeID,
'NeedsInventory',
'HWH'
FROM Nodes n
LEFT JOIN APM_HardwareInfo hw
ON (n.NodeID = hw.NodeID)
WHERE n.ObjectSubType = 'SNMP'
AND hw.NodeID IS NULL
AND n.NodeID NOT IN (SELECT
NodeID
FROM dbo.[NodeSettings]
WHERE SettingName = 'NeedsInventory'
AND SettingValue = 'HWH')