问题描述
我正在尝试根据一些关系将CSV数据迁移到Drupal系统。
例如:我总共有三个CSV文件。 1. children data 2. User data 3. User and Children relationship
。
要求:User profile
具有到Children data
的实体引用字段(field_childid),并且此关系在User and Children Relationship CSV file
中进行管理。
我为User
和Children
数据创建了单独的迁移,但是如何使用关系数据来映射哪些子项属于哪个用户?
注意:关系文件具有两个值Child id
和User id
(外部系统ID在Children and User data
中是相同的,而不是Drupal系统的ID)。
有人遇到过这种情况吗?
我在第三次迁移(关系迁移)中尝试了migration_lookup
,但它没有更新用户。
source:
plugin: csv
path: 'filepath/sponsor_to_child.csv'
header_row_count: 1
ids:
- sponsorId
process:
field_childid:
plugin: migration_lookup
migration:
- child_migrate
- users_migrate
source_ids:
child_migrate:
- childId
users_migrate:
- sponsorId
destination:
plugin: 'entity:user'
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)