Skip to content

Commit

Permalink
Only exporting verified suspected/confirmed cases
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-sheldon committed Mar 29, 2024
1 parent 094f95f commit 115a67d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions data-serving/scripts/export-data/Dockerfile_full_export
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ RUN apk update
RUN apk add bash aws-cli mongodb-tools curl

COPY full_export.sh .
COPY query.json .
COPY fields.txt .

ENTRYPOINT ["./full_export.sh"]
2 changes: 1 addition & 1 deletion data-serving/scripts/export-data/full_export.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require_env() {
require_env "${FULL_EXPORT_BUCKET:-}" "Specify FULL_EXPORT_BUCKET"
require_env "${CONN:-}" "Specify MongoDB connection string in CONN"

mongoexport --uri="$CONN" --collection=day0cases --fieldFile=fields.txt --type=csv --out full.csv
mongoexport --uri="$CONN" --queryFile="query.json" --collection=day0cases --fieldFile=fields.txt --type=csv --out full.csv

gzip full.csv

Expand Down
8 changes: 8 additions & 0 deletions data-serving/scripts/export-data/query.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"caseStatus": {
"$nin": [ "discarded", "omit_error" ]
},
"curators.verifiedBy": {
"$exists": "true"
}
}

0 comments on commit 115a67d

Please sign in to comment.