Skip to content

Commit

Permalink
add test job
Browse files Browse the repository at this point in the history
  • Loading branch information
smnorris committed Feb 22, 2024
1 parent e551f59 commit 96a2a61
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions jobs/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash
set -euxo pipefail

ogr2ogr \
-f GPKG \
test.gpkg \
PG:$DATABASE_URL \
-nln crossings \
-nlt PointZM \
-sql "select *
from bcfishpass.freshwater_fish_habitat_accessibility_model_crossings_vw
limit 100"

ogr2ogr \
-f GPKG \
-append \
-update \
test.gpkg \
PG:$DATABASE_URL \
-nln barriers_salmon \
-nlt PointZM \
-sql "select
barriers_ch_cm_co_pk_sk_id,
barrier_type,
barrier_name,
linear_feature_id,
blue_line_key,
watershed_key,
downstream_route_measure,
wscode_ltree as wscode,
localcode_ltree as localcode,
watershed_group_code,
total_network_km,
geom
from bcfishpass.barriers_ch_cm_co_pk_sk
limit 100"

# requires gdal >=3.7
sozip \
test.gpkg.zip \
test.gpkg

aws s3 cp test.gpkg.zip s3://bcfishpass
aws s3api put-object-acl \
--bucket bcfishpass \
--key test.gpkg.zip \
--acl public-read

0 comments on commit 96a2a61

Please sign in to comment.