-
Notifications
You must be signed in to change notification settings - Fork 2
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
Hdxdsys 843 Add DTM data #168
Conversation
hxl_tags = admin_results["headers"][1] | ||
values = admin_results["values"] | ||
admin_codes = values[0].keys() | ||
for admin_code in admin_codes: |
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.
Given we're probably going to pause HAPI development this quarter, this may be a moot point, but for data that has already been set up in the right form by pipeline, I wonder if the simplicity of the YAML configurable scraper for reading the data is cancelled out by the complexity of the database upload code with the nested for loops.
That was my thinking for humanitarian needs where it looked much simpler (and more efficient) to read the file and upload to db in one step and not use a configurable scraper at all. This probably indicates we're missing the right kind of configurable reader as there would probably be commonality between IDPs and humanitarian needs reading. Just something to think about.
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.
I was wondering why you didn't use the configurable scraper for HNO, and now that makes so much sense. Indeed there are a lot of inefficiencies in my DTM implementation, but let's just close our eyes and get it out the door. If we end up moving forward with HAPI / standardization then it will get refactored to the DTM scraper I'd imagine.
reporting_round, | ||
operation, | ||
) | ||
if duplicate_row_check in duplicate_rows: |
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.
Out of curiosity, why are there duplicate rows?
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.
I have the same question, I plan on emailing DTM to ask
Pull Request Test Coverage Report for Build 10940531302Details
💛 - Coveralls |
Finally getting the DTM data into HAPI. This isn't the end of the story though, I will also need to split up the UNHCR data into the refugees and returnees endpoints.
Please also see OCHA-DAP/hapi-sqlalchemy-schema#64
The tests will work once I merge the schema PR above .