Last active
September 15, 2021 16:10
-
-
Save sdstrowes/e9d4a3c7c03dd1aafa3198333cc39ffa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with matching_traceroutes as ( | |
select start_time, prb_id, msm_id, hops | |
from ripencc-atlas.yesterday.traceroute, unnest(hops) h | |
where net.ip_trunc(h.hop_addr_bytes, 8) = net.ip_from_string("10.0.0.0") and af = 4 and hop > 4 | |
) | |
-- ANY_VALUE() and TO_JSON_STRING() are magic to get back to the | |
-- original record, since I unpacked the hops in the statement above | |
select ANY_VALUE(matching_traceroutes).* | |
from matching_traceroutes | |
group by TO_JSON_STRING(matching_traceroutes) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment