-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from iag-geo/202405
202405
- Loading branch information
Showing
16 changed files
with
119 additions
and
119 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
|
||
CREATE SCHEMA IF NOT EXISTS gnaf_202402_gda2020 AUTHORIZATION postgres; | ||
CREATE SCHEMA IF NOT EXISTS gnaf_202405_gda2020 AUTHORIZATION postgres; | ||
|
||
-- create tables | ||
drop table if exists gnaf_202402_gda2020.address_principal_census_2016_boundaries; | ||
create table gnaf_202402_gda2020.address_principal_census_2016_boundaries as | ||
select * from gnaf_202402.address_principal_census_2016_boundaries; | ||
analyse gnaf_202402_gda2020.address_principal_census_2016_boundaries; | ||
|
||
drop table if exists gnaf_202402_gda2020.address_principal_census_2021_boundaries; | ||
create table gnaf_202402_gda2020.address_principal_census_2021_boundaries as | ||
select * from gnaf_202402.address_principal_census_2021_boundaries; | ||
analyse gnaf_202402_gda2020.address_principal_census_2021_boundaries; | ||
|
||
drop table if exists gnaf_202402_gda2020.boundary_concordance_score; | ||
create table gnaf_202402_gda2020.boundary_concordance_score as | ||
select * from gnaf_202402.boundary_concordance_score; | ||
analyse gnaf_202402_gda2020.boundary_concordance_score; | ||
|
||
drop table if exists gnaf_202402_gda2020.boundary_concordance; | ||
create table gnaf_202402_gda2020.boundary_concordance as | ||
select * from gnaf_202402.boundary_concordance; | ||
analyse gnaf_202402_gda2020.boundary_concordance; | ||
drop table if exists gnaf_202405_gda2020.address_principal_census_2016_boundaries; | ||
create table gnaf_202405_gda2020.address_principal_census_2016_boundaries as | ||
select * from gnaf_202405.address_principal_census_2016_boundaries; | ||
analyse gnaf_202405_gda2020.address_principal_census_2016_boundaries; | ||
|
||
drop table if exists gnaf_202405_gda2020.address_principal_census_2021_boundaries; | ||
create table gnaf_202405_gda2020.address_principal_census_2021_boundaries as | ||
select * from gnaf_202405.address_principal_census_2021_boundaries; | ||
analyse gnaf_202405_gda2020.address_principal_census_2021_boundaries; | ||
|
||
drop table if exists gnaf_202405_gda2020.boundary_concordance_score; | ||
create table gnaf_202405_gda2020.boundary_concordance_score as | ||
select * from gnaf_202405.boundary_concordance_score; | ||
analyse gnaf_202405_gda2020.boundary_concordance_score; | ||
|
||
drop table if exists gnaf_202405_gda2020.boundary_concordance; | ||
create table gnaf_202405_gda2020.boundary_concordance as | ||
select * from gnaf_202405.boundary_concordance; | ||
analyse gnaf_202405_gda2020.boundary_concordance; | ||
|
||
-- add primary key (faster if done after import) -- completed in 8 s 496 ms | ||
alter table gnaf_202402_gda2020.boundary_concordance add constraint boundary_concordance_gda2020_pkey | ||
alter table gnaf_202405_gda2020.boundary_concordance add constraint boundary_concordance_gda2020_pkey | ||
primary key (from_source, from_bdy, from_id, to_source, to_bdy, to_id); | ||
|
||
-- add index on required fields for converting data | ||
create index boundary_concordance_gda2020_combo_idx on gnaf_202402_gda2020.boundary_concordance | ||
create index boundary_concordance_gda2020_combo_idx on gnaf_202405_gda2020.boundary_concordance | ||
using btree (from_source, from_bdy, to_source, to_bdy); | ||
|
||
alter table gnaf_202402_gda2020.boundary_concordance cluster on boundary_concordance_gda2020_combo_idx; | ||
alter table gnaf_202405_gda2020.boundary_concordance cluster on boundary_concordance_gda2020_combo_idx; | ||
|
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
Oops, something went wrong.