cubicweb #5414753 [dataimport] backport ExtEntity[Importer] from skos [resolved]

Currently, every stores / import is almost a special case. Together with the new store API (#5040344), the skos cube introduce the following class to allow more code reuse while keeping flexibility :

  • ExtEntity, some intermediate representation of data to import, using external identifier but no eid
  • ExtEntitiesImporter, class responsible for turning ExtEntity's extid to eid, doing creation or update accordingly and may be controlling the insertion order of entities before feeding them to a Store
  • Store, class responsible for inserting values in the backend database (already in)

The missing bit is the Generator, class or functions that will yield ExtEntity from some data source (eg RDF, CSV) and remostly business dependant. The skos cube provides a generic generator for RDF data based on a mapping inspired by the current xy API. This could be backported as well at some point but this is not the purpose of this ticket.

done in3.21.0
load left0.000
closed by#d260722f2453 [dataimport] introduce the importer and extentity classes
patch[dataimport] dispatch and deprecate old code [applied][doc] Add a tutorial and extend documentation for ExtEntityImporter [applied][dataimport] introduce the importer and extentity classes [applied][test] Add a "functional" test for dataimport.importer using a CSV data source [folded]