magento / magento/data-migration-tool
Feature Request: Possibility to split the option files declared in config.xml to multiple files.
- Dominant language
- PHP
- Stars
- 339
- Forks
- 195
- PR merge metrics
- No merged PRs in 30d
Description
Story:
As a developer, I would like to split my configuration files for data migration so I can easily group, isolate and change migration config based on their functionality.
Example
the xpath `config -> options -> map_file` from the config.xml.dist file contains on string at the moment
```
....
etc/opensource-to-opensource/1.9.4.5/map.xml.dist
....
.....
```
If I want to add my own custom maping rules for documents and fields, I need to copy the file `etc/opensource-to-opensource/1.9.4.5/map.xml.dist` to a custom module and add my changes in the file clone and then replace in the config file the map_file tag.
This map.xml.dist file has by default 2k+ lines and if I add a few dozens it becomes hard to follow.
Ideally I could create my own map file with just my custom settings. and leave the core one untouched.
so the configuration above becomes
```
....
etc/opensource-to-opensource/1.9.4.5/map.xml.dist
Vendor_Module/etc/file1.xml
Vendor_Module/etc/file2.xml
....
....
.....
```
the tag names `core`, `custom_file_1` are not important.
So instead of loading a single file, the `Migration\Reader\Groups::init` method would read multiple files and merge the contents.
To keep backwards compatibility, the `$groupsFile` parameter can be either string or array. If it's a string, it should behave like it does not, if it's an array it should read all of files in the array.
Contributor guide
Research direction
Start with the config.xml.dist map_file option and Migration\Reader\Groups::init. Trace how the current string path is read and how groups are built, then determine how multiple paths can be merged while preserving the existing string behavior. Done means core and custom map files can be declared together without changing existing single-file configurations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100