Add CSV data_parser

Created on 4 May 2020, about 5 years ago
Updated 16 March 2023, over 2 years ago

Given that the data_fetchers provide support for multiple files and multiple http sources, it would be nice to have a CSV data_parser so that migrate can import CSV data the same way it can currently handle XML, JSON, and SOAP.

This has some roots in the following issues:

✨ Feature request
Status

Needs work

Version

5.0

Component

Plugins

Created by

πŸ‡ΊπŸ‡ΈUnited States swirt Florida

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡±Netherlands Summit

    Hi, How to proceed to get this Drupal 10 compliant reade in this module please?
    greetings,

  • πŸ‡ΊπŸ‡ΈUnited States mikelutz Michigan, USA

    I'm not a fan of using league/csv here without it being an actual module dependency, There's no way for someone to know that they must manually add league/csv to use the csv parser. And I don't want to add league/csv as a dependency to migrate plus as most people have no need for it as mentioned in #3

    I think what we should do is add the migrate_plus parser plugin to migrate_source_csv alongside the standalone source. That way the league dependency is contained to the module that needs it, and with migrate_source_csv you have the option of the standalone source, or the flexibility of the migrate_plus fetchers if you need them.

    @heddn, Thoughts on moving the issue to migrate_source_csv?

  • heddn Nicaragua

    Seems like a great suggestion. Moving.

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update almost 2 years ago
    16 pass
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.1.x + Environment: PHP 8.1 & sqlite-3.27
    last update almost 2 years ago
    Composer require failure
  • πŸ‡ΊπŸ‡¦Ukraine taras.suliatitskiy

    After 6.0.1 β†’ release of migrate plus module, if http data fetcher is in use, an error will occur in \Drupal\migrate_plus\Plugin\migrate_plus\data_parser\Csv::getSourceData() after $response = $this->getDataFetcherPlugin()->getResponseContent($url); returns object instead of a string. This new patch should fix it.

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.1.x + Environment: PHP 8.1 & sqlite-3.27
    last update almost 2 years ago
    16 pass
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update almost 2 years ago
    16 pass
  • heddn Nicaragua

    I'm pretty sure this needs a rebase.

  • First commit to issue fork.
  • Merge request !17Add CSV data_parser #3133523 β†’ (Open) created by sorlov
  • πŸ‡·πŸ‡ΊRussia sorlov

    Created MR using patch from https://www.drupal.org/project/migrate_source_csv/issues/3133523#comment... ✨ Add CSV data_parser Needs work

  • Pipeline finished with Failed
    4 months ago
    Total: 358s
    #442714
  • Status changed to Needs review 17 days ago
  • πŸ‡΅πŸ‡­Philippines madelyncruz

    @sorlov,

    Thank you for the patch. I followed the example, but I’m getting the following error during import:

    Could not retrieve source count from more_better_beer: Plugin (csv) instance class "Drupal\migrate_source_csv\Plugin\migrate_plus\data_parser\Csv" does not exist.

    I also noticed that the default_bundle property is not in the top-level key of destination. I tried moving it there, but I got the same error. I'm using D11 version btw.

Production build 0.71.5 2024