Skip to content

Commit

Permalink
[ETL-655] Add Device field to fitbitdevices INDEX_FIELD_MAP (#117)
Browse files Browse the repository at this point in the history
* Add `Device` field to fitbitdevices INDEX_FIELD_MAP

* Specify the number of integration test exports as env variable
  • Loading branch information
philerooski authored Jun 5, 2024
1 parent 75f7ed5 commit 940fde3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/upload-and-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:
DEV_INPUT_BUCKET: recover-dev-input-data
DEV_PROCESSED_BUCKET: recover-dev-processed-data
PROD_INPUT_BUCKET: recover-input-data
INTEGRATION_TEST_NUM_EXPORTS: 28

jobs:

Expand Down Expand Up @@ -287,7 +288,7 @@ jobs:
aws s3api list-objects-v2 \
--bucket $DEV_INPUT_BUCKET \
--prefix $EXPORT_S3_KEY_PREFIX \
--query '((sort_by(Contents[? !ends_with(Key, `/`) && !contains(Key, `owner.txt`)], &LastModified)[::-1])[:28])[*].Key' |
--query '((sort_by(Contents[? !ends_with(Key, `/`) && !contains(Key, `owner.txt`)], &LastModified)[::-1])[:${{ env.INTEGRATION_TEST_NUM_EXPORTS }}])[*].Key' |
jq -c
)" >> "$GITHUB_OUTPUT"
Expand Down Expand Up @@ -363,7 +364,7 @@ jobs:
aws s3api list-objects-v2 \
--bucket $PROD_INPUT_BUCKET \
--prefix "$EXPORT_S3_KEY_PREFIX/" \
--query '((sort_by(Contents[? !ends_with(Key, `/`) && !contains(Key, `owner.txt`)], &LastModified)[::-1])[:28])[*].Key' |
--query '((sort_by(Contents[? !ends_with(Key, `/`) && !contains(Key, `owner.txt`)], &LastModified)[::-1])[:${{ env.INTEGRATION_TEST_NUM_EXPORTS }}])[*].Key' |
jq -c
)" >> "$GITHUB_OUTPUT"
Expand Down
2 changes: 1 addition & 1 deletion src/glue/jobs/json_to_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
INDEX_FIELD_MAP = {
"enrolledparticipants": ["ParticipantIdentifier"],
"fitbitprofiles": ["ParticipantIdentifier", "ModifiedDate"],
"fitbitdevices": ["ParticipantIdentifier", "Date"],
"fitbitdevices": ["ParticipantIdentifier", "Date", "Device"],
"fitbitactivitylogs": ["ParticipantIdentifier", "LogId"],
"fitbitdailydata": ["ParticipantIdentifier", "Date"],
"fitbitecg": ["ParticipantIdentifier", "FitbitEcgKey"],
Expand Down

0 comments on commit 940fde3

Please sign in to comment.