I'm using the schema Delivery and tracking statistics (nms) nms deliveryLogStats and filtering by @hardBounce is not empty, I'm getting numbers but when I click on Display the target... to preview the result it's not loading. So I can't tell if it is working or not.
Is this the best way to achieve this or is there an easiest way to get these recipients? I need the query to send it as a csv file to a SFTP.
One more thing, a tip: don't forget that there is a factory relationship between nms:recipient and nms:address (containing soft bounces/hard bounces emails) that is convenient to use in your queries for filtering contacts; you can use it by displaying Advanced fields and then select emailInfo element attributes (for instance Status attribute).
"Hardbounces" information is not an unique value/field/indicator, but is a combination, built from several information/fields values, including the error reason, and errors count for some kind of errors. Please read this documentation:
But I guess you want actually to filter on Quarantine value of Status field, rather than hardbounces.
For instance, someone who has a mailbox which is full (which is a soft bounce), after 6 consecutive attempts in failures, will be considered in quarantine (while being not an hardbounce on 1st attempt).
nms:deliveryLogsStats stores global statistics only, key is (deliveryId, domain) so for instance all global counts for gmail.com domain and one specific delivery.
If you have to extract data related to specific or all recipients, you must use nms:trackingLogRcp and nms:broadLogRcp for equivalent information (detailed information).
The same for nms:trackingStats, consolidated stats of tracking data nms:trackingLogRcp, not per recipient basis.
But please notice that these high volumetry nms:trackingLogRcp and nms:broadLogRcp tables are cleansed automatically (nightly) by the technical process "cleanup", based on the purge data settings, typically, 3 or 6 or 12 months depending on customer choices on data retention. (see xtk:option values of NmsCleanup_TrackingLogPurgeDelay and NmsCleanup_BroadLogPurgeDelay for your own instance), either in Administration/Platform/Options or in the Tools/Advanced/Deployment Wizard menu of Adobe Campaign classic version if you have admin privileges.)