Skip to content

Commit

Permalink
dump gradient barriers to csv
Browse files Browse the repository at this point in the history
  • Loading branch information
smnorris committed Nov 6, 2023
1 parent f42286c commit 49c753e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions release/gradient_barriers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -euxo pipefail

# dump gradient barriers to csv on s3
echo 'dump gradient barriers table to csv'
psql $DATABASE_URL --csv -c "select
blue_line_key,
downstream_route_measure,
wscode_ltree as wscode,
localcode_ltree as localcode,
watershed_group_code,
gradient_class
from bcfishpass.gradient_barriers b
where gradient_class in (5, 10, 15, 20, 25, 30)" | gzip | aws s3 cp - s3://bcfishpass/gradient_barriers.csv.gz

aws s3api put-object-acl --bucket bcfishpass --key gradient_barriers.csv.gz --acl public-read

0 comments on commit 49c753e

Please sign in to comment.