-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 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
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 |