Skip to content

Commit

Permalink
missed merges
Browse files Browse the repository at this point in the history
  • Loading branch information
smnorris committed Dec 24, 2024
1 parent 260b572 commit 9e99903
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 81 deletions.
72 changes: 0 additions & 72 deletions jobs/load_monthly
Original file line number Diff line number Diff line change
Expand Up @@ -9,77 +9,6 @@ PSQL="psql $DATABASE_URL -v ON_ERROR_STOP=1"

# bcdata loads
# ----
<<<<<<< HEAD
bcdata bc2pg -r whse_admin_boundaries.clab_indian_reserves
bcdata bc2pg -r whse_admin_boundaries.clab_national_parks
bcdata bc2pg -r whse_basemapping.gba_local_reg_greenspaces_sp
bcdata bc2pg -r whse_basemapping.gba_railway_structure_lines_sp
bcdata bc2pg -r whse_basemapping.gba_railway_tracks_sp
bcdata bc2pg -r whse_basemapping.gba_transmission_lines_sp
bcdata bc2pg -r whse_basemapping.gns_geographical_names_sp
bcdata bc2pg -r whse_environmental_monitoring.envcan_hydrometric_stn_sp
bcdata bc2pg -r whse_fish.fiss_stream_sample_sites_sp
bcdata bc2pg -r whse_forest_tenure.ften_range_poly_svw
bcdata bc2pg -r whse_imagery_and_base_maps.mot_road_structure_sp
bcdata bc2pg -r whse_legal_admin_boundaries.abms_municipalities_sp
bcdata bc2pg -r whse_mineral_tenure.og_petrlm_dev_rds_pre06_pub_sp
bcdata bc2pg -r whse_tantalis.ta_conservancy_areas_svw
bcdata bc2pg -r whse_tantalis.ta_park_ecores_pa_svw
bcdata bc2pg -r whse_forest_tenure.ften_road_section_lines_svw
bcdata bc2pg -r whse_mineral_tenure.og_road_segment_permit_sp


# load DRA from object storage (with public portion of source transport_line schema)
$PSQL -c "drop table if exists bcdata.transport_line" # in case of any failed loads
ogr2ogr \
-f PostgreSQL \
"PG:$DATABASE_URL" \
--config PG_USE_COPY YES \
-lco GEOMETRY_NAME=geom \
-lco FID=transport_line_id \
-nln bcdata.transport_line \
/vsizip//vsicurl/https://nrs.objectstore.gov.bc.ca/bchamp/bcdata/transport_line.gpkg.zip \
transport_line
$PSQL -c "truncate whse_basemapping.transport_line;
insert into whse_basemapping.transport_line
(
transport_line_id,
custodian_partner_org,
capture_date,
data_capture_method_code,
total_number_of_lanes,
structured_name_1,
structured_name_2,
structured_name_3,
structured_name_4,
structured_name_5,
highway_route_1,
highway_exit_number,
transport_line_type_code,
transport_line_surface_code,
transport_line_structure_code,
geom
)
select
transport_line_id,
custodian_partner_org,
capture_date,
data_capture_method_code,
total_number_of_lanes,
structured_name_1,
structured_name_2,
structured_name_3,
structured_name_4,
structured_name_5,
highway_route_1,
highway_exit_number,
transport_line_type_code,
transport_line_surface_code,
transport_line_structure_code,
geom
from bcdata.transport_line"
$PSQL -c "drop table bcdata.transport_line"
=======
jq -c '.[]' bcgw_sources.json | while read item; do
schedule=$(jq -r '.schedule' <<< "$item")
source=$(jq -r '.source' <<< "$item")
Expand Down Expand Up @@ -107,7 +36,6 @@ ogr2ogr -f PostgreSQL \
--config PG_USE_COPY=YES \
/vsicurl/https://nrs.objectstore.gov.bc.ca/bchamp/bcdata/transport_line.parquet \
transport_line
>>>>>>> main

#-------
# refresh code tables - unlikely to change, but simple/quick to load
Expand Down
9 changes: 0 additions & 9 deletions jobs/load_weekly
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ PSQL="psql $DATABASE_URL -v ON_ERROR_STOP=1"
# weekly bcfishobs processing is scheduled via workflow bcfishobs repository

# bcdata loads
<<<<<<< HEAD
bcdata bc2pg -r whse_fish.fiss_fish_obsrvtn_pnt_sp --query "POINT_TYPE_CODE = 'Observation'"
bcdata bc2pg -r whse_fish.fiss_obstacles_pnt_sp
bcdata bc2pg -r whse_fish.pscis_assessment_svw
bcdata bc2pg -r whse_fish.pscis_design_proposal_svw
bcdata bc2pg -r whse_fish.pscis_habitat_confirmation_svw
bcdata bc2pg -r whse_fish.pscis_remediation_svw
=======
jq -c '.[]' bcgw_sources.json | while read item; do
schedule=$(jq -r '.schedule' <<< "$item")
source=$(jq -r '.source' <<< "$item")
Expand All @@ -35,7 +27,6 @@ jq -c '.[]' bcgw_sources.json | while read item; do
$source || exit 1
fi
done
>>>>>>> main

# cabd
ogr2ogr -f PostgreSQL \
Expand Down

0 comments on commit 9e99903

Please sign in to comment.