Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT asn,SUBSTRING_INDEX(k,':',-1)cc INTO outfile '/tmp/rir-asns.txt' from bh_cache,json_table(jdoc, '$.resources.asn[*]' columns (asn int path '$')) r where k like 'country-resource-list:%' ORDER BY asn;
- SELECT prefix,SUBSTRING_INDEX(k,':',-1)cc INTO outfile '/tmp/rir-prefixes.txt' from bh_cache,json_table(jdoc, '$.resources.ipv4[*]' columns (prefix VARCHAR(255) path '$')) r where k like 'country-resource-list:%' ORDER BY inet_aton(REGEXP_SUBSTR(prefix,'[0-9]+'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement