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.
[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using BDD.]
[ ] GIVEN I have a series of records output by the harvest runner's compare step
THEN I want to create the HarvestRecords ORM object in a for loop, saving the newly generated UUID to the accompanying CKAN record, prior to inerting the objects into the DB.
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.
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
id
to the outgoing CKAN recordds.add_all()