Open dafeder opened 3 years ago
Created initial proof of concept, still in progress.
dktl drush queue:run datastore_import
@dafeder I just fixed the issue of the table not being created by adding an extra function to do some mapping between types, in theory frictionless data tables have specific types and they not necessarily match the db types, so for testing I added one extra function that adds some mapping there. So there are two things to do:
We want to support, through documentation and probably some helper classes added to the codebase, the application of basic column-level metadata (data type, description) at the moment of an import. For now this will need to be implemented via custom event listener on a per-site basis, but there should be an established pattern to create the listener and provide Drupal with table schema instructions to pass to the DB server based on Frictionless Table Schema field definitions. A helper class could be the best way to pass a single field definition, such as...
... and get back the correct instructions for the Drupal schema API to apply to the table.
Examples coming...