terraref / brapi

Breeder's API implementation for TERRA-REF
https://terraref.org/brapi/v1/calls
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

add germplasm records to attributes table #7

Open dlebauer opened 6 years ago

dlebauer commented 6 years ago

Here are the responses for one of our sets of germplasm -

germplasm.txt

How should I get this into the database?

I've also generated a set of insert statements that look like:

"insert into attributes (table,  table_id, json), values (6000000231'cultivars'{\"accessionNumber\":[\"PI564163\"],\"acquisitionDate\":[\"1977----\"],\"biologicalStatusOfAccessionCode\":[500],\"breedingMethodDbId\":[\"\"],\"commonCropName\":[\"sorghum\"],\"defaultDisplayName\":[\"PI564163\"],\"donors\":{\"donorAccessionNumber\":[\"\"],\"donorInstituteCode\":[\"\"],\"germplasmPUI\":[\"\"]},\"genus\":[\"Sorghum\"],\"germplasmDbId\":[\"0ba28636-e634-428a-aa58-4346a20de326\"],\"germplasmName\":[\"PI564163\"],\"germplasmPUI\":[\"https://purl.org/germplasm/id/0ba28636-e634-428a-aa58-4346a20de326\"],\"instituteCode\":[\"USA016\"],\"instituteName\":[\"\"],\"pedigree\":{},\"seedSource\":{},\"species\":[\"bicolor\"],\"speciesAuthority\":[\"(L.) Moench\"],\"subtaxa\":[\"subsp. bicolor\"],\"subtaxaAuthority\":[\"(L.) Moench\"],\"synonyms\":[\"BTx623\",\"BTx623\",\"SAP-32\",\"SAP-32\"],\"taxonIds\":[{\"sourceName\":[\"ncbiTaxon\"],\"taxonId\":[\"http://purl.obolibrary.org/obo/NCBITaxon_4558\"]},{\"sourceName\":[\"USDA Plants\"],\"taxonId\":[\"https://plants.usda.gov/core/profile?symbol=SOBIB\"]}],\"typeOfGermplasmStorageCode\":[10],\"xref\":[\"PI564163\",\"https://terraref.ncsa.illinois.edu/bety/cultivars/6000000231\"]});"