Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ETL-653] Add corresponding deleted data type table for all HealthKit data types #116

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

philerooski
Copy link
Contributor

We didn't have *_Deleted tables for some HealthKit data types, which caused L255 of src/glue/jobs/json_to_parquet.py to raise a caught exception rather than removing deleted records for that data type. This only affected the HealthKitV2Heartbeat data type since we haven't received deleted records for any other HealthKit data type besides HealthKitV2Samples, which we already had a corresponding *_Deleted table for.

In addition to adding these new tables, I updated a few lines in src/glue/jobs/s3_to_json.py. In particular, the addition of the HealthKitV2Samples_Deleted and HealthKitV2Statistics_Deleted data types to the DATA_TYPES_WITH_SUBTYPE has the effect of adding the subtype included in the JSON file name into the JSON itself as a Type field. This field is not relevant when dropping deleted records from the data type, but it is file metadata which we were previously ignoring and not including in the resulting JSON datasets.

@philerooski philerooski requested a review from a team as a code owner June 1, 2024 00:33
Copy link
Member

@thomasyu888 thomasyu888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 LGTM! Ill defer to rixing to give a final review.

"HealthKitV2Samples",
"HealthKitV2Statistics",
"HealthKitV2Samples_Deleted",
"HealthKitV2Statistics_Deleted"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add all the other HealthKit data columns here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, these are the only data types with a subtype.

@thomasyu888 thomasyu888 requested a review from rxu17 June 3, 2024 16:14
Copy link
Contributor

@BryanFauble BryanFauble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@rxu17 rxu17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just had a couple Qs/comments

src/glue/jobs/json_to_parquet.py Show resolved Hide resolved
src/glue/jobs/json_to_parquet.py Outdated Show resolved Hide resolved
Copy link

sonarqubecloud bot commented Jun 4, 2024

Quality Gate Passed Quality Gate passed

Issues
34 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants