GSA / data.gov

Main repository for the data.gov service
https://data.gov
Other
546 stars 87 forks source link

Refactor DB interface add_harvest_records method #4736

Closed btylerburton closed 1 month ago

btylerburton commented 1 month ago

User Story

In order to keep track of the correlation between the harvest records db table and the records in CKAN, datagovteam needs to add the sqlalchemy generated UUID to CKAN metadata. To accomplish that goal, we need to generate the HarvestRecord ORM object prior to inserting into the DB.

Related to:

Acceptance Criteria

[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using BDD.]

Background

Work done in the prior PR would not have allowed for the generation of UUID's individually. Any performance gains by bulk records insertion would be mititagated by a second for loop to recover that UUID prior to posting to CKAN.

Security Considerations (required)

[Any security concerns that might be implicated in the change. "None" is OK, just be explicit here!]

Sketch