-
Notifications
You must be signed in to change notification settings - Fork 5
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
Check the total number of rows throughout the catalog import pipeline #345
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #345 +/- ##
==========================================
- Coverage 99.79% 99.72% -0.07%
==========================================
Files 26 26
Lines 1442 1452 +10
==========================================
+ Hits 1439 1448 +9
- Misses 3 4 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I have a minor question
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I think it will also be important to check this value against the number of rows in the parquet files directly at some point. In cases where the import process goes a little funky the parquet files can diverge from what was written in log files, and those are cases where this test can be especially valuable.
The method that writes out the parquet metadata will look at all of the footers for the parquet data files. astronomy-commons/hats#306 will have that method return the total count. This would also be helpful for a few other import pipelines, where we read the footers AGAIN to calculate the total number of rows written. Once that PR is in, I'll update the code here to add the check. |
Change Description
Closes #344
Solution Description
Adds a new argument,
expected_total_rows
, that users can specify if the total number of rows to be imported is known ahead of time. After the mapping stage, we check this against the total number of rows encountered.Using the result from the mapping stage, we also check the total for the scheduled reducing stage as well.
Code Quality