austb
01/19/2026, 4:12 PMlog-queries = true in the puppetdb section of the conf file (in the sandbox script I use it's just pdb edit).
Then (also with my custom script) you can pdb run a local openvoxdb, and send a query to it
pdb aq -- '["from","inventory",["extract",["facts.sne'"'"'aky\"fact"],["=","node_state","active"],["group_by","facts.sne'"'"'aky\"fact"]]]'
and then the logs will have the SQL string generated.
"... SELECT (fs.stable || fs.volatile) -> 'sne''aky\"fact' AS \"facts.sne'aky\"\"fact\" FROM factsets AS fs LEFT JOIN certnames ON fs.certname = certnames.certname WHERE NOT ((certnames.certname) IN (SELECT certname FROM (SELECT not_active_nodes.certname AS \"certname\" FROM not_active_nodes) AS sub)) GROUP BY \"facts.sne'aky\"\"fact\""
all three locations in there look properly escaped still.