ClickHouse/dbms/scripts/geobase_to_regions_hierarchy.pl

12 lines
204 B
Perl
Raw Normal View History

2014-09-11 17:46:41 +00:00
#!/usr/bin/perl -w
use strict;
use warnings;
use geobase;
foreach my $key (keys %Region) {
print $key . "\t"
. ($Region{$key}->{parents}[-1] || 0) . "\t"
. ($Region{$key}->{type} || 0) . "\n";
}