- πΊπΈUnited States danflanagan8 St. Louis, US
Sounds like Migrate Sandbox! β
I knew I wasn't the only one who wanted something like this. :)
It would be really useful to have a UI tool for testing migration process configuration on the fly.
At the moment, when something goes wrong with processing, you have to tweak the config file, do config-devel-import, run a migration again, watch it fail, repeat.
I am thinking a UI that has a form that lets you specify:
- the migration ID
- a single source ID to try to import
- a text area into which to paste process YML configuration
It's possible to pass process configuration to a migration on the fly, like this:
$migration_id = 'mymigration';
$manager = \Drupal::service('plugin.manager.config_entity_migration');
$migration = $manager->createInstance($migration_id);
// This is anything that could go under 'process:' in a migration config file:
$process_yaml = <<<EOT
type: field_foo/0/value
EOT;
$process = [
"type" => "field_section/0/value",
];
$process = \Symfony\Component\Yaml\Yaml::parse($process_yaml);
$migration->setProcess($process);
$log = new Drupal\migrate_tools\DrushLogMigrateMessage();
$executable = new Drupal\migrate_tools\MigrateExecutable($migration, $log, []);
$source = $migration->getSourcePlugin();
$source->rewind();
$source->valid();
$row = $source->current();
dsm($row);
$executable->processRow($row);
dsm($row);
The second output of $row shows the processed data in its destination property.
Active
4.0
User interface
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Sounds like Migrate Sandbox! β
I knew I wasn't the only one who wanted something like this. :)