Would like some help with comparing two buckets for differences

So i have an issue where i have lost data on a bucket in one cluster. i happen to have a good copy of the data in a different cluster having the same bucket name. What i would like to do rather than restore totally the good copy into the messed up one i would like to compare the buckets for differences and see what was changed/lost to troubleshoot the issue with our application (they aren’t very large.) So my plan is to put up a new cluster with both buckets bucket1 (bad) and bucket2 (good) and compare differences both ways (one at a time.) However i’m a bit flummoxed as to how to write the query. Rather than reinvent the wheel i was hoping someone on the forum has had to do this at some point and would be able to assist. I searched but haven’t come up with a good post yet.
Thanks in advance for any help.

Check out the MERGE command. It’s for use cases like this.


Try EXCEPT/EXCEPT ALL and see if that helps.

SELECT MEAT(d).id, d.* FROM good d EXCEPT ALL SELECT MEAT(d).id, d.* FROM bad d;
SELECT MEAT(d).id, d.* FROM bad d EXCEPT ALL SELECT MEAT(d).id, d.* FROM good d;

thank you, that’s the sort of direction I wanted to go in. Merge would work but I couldn’t find a report only option. It would just do it. That I could pretty easily do. I would like to know what is different to help the app team troubleshoot how it happened.
Ill muck about the except thanks.