Score:0

Migrate a two-textfield field

cn flag

I'm looking to migrate a text field from Drupal 6 to Drupal 9. The field has two text fields.

The table description returned by describe content_field_telfono ; is the following.

Field Type Null Key Default Extra
vid int(10) unsigned NO PRI 0
nid int(10) unsigned NO MUL 0
field_telfono_value varchar(10) YES NULL
delta int(10) unsigned NO PRI 0

The table content returned by select * from content_field_telfono limit 0,2; is the following.

vid nid field_telfono_value delta
48 48 xxxxxxxxx 0
48 48 xxxxxxxxx 1

I found examples to migrate a multi-value. I tried with the following migration.

  field_school_phone:
    plugin: sub_process
    source: field_telfono
    process:
      value: field_telfono_value
Kevin avatar
in flag
Did you just try a simple map first? source: destination
cn flag
How can I make it? The only examples I find in the core modules it's to map constants values. Thanks.
Kevin avatar
in flag
Make what? Simply try doing field_school_phone: field_telfono and running it again. There are several several examples in core for migrations, as well as contributed modules like Migrate Plus.
Score:-1
br flag

have you seen this? migration using csv and yml for multivalued image field

anyway i think if you have the multivalued field separated by commas, it should work directly

id flag
Thanks for helping out. This appears to be a comment rather than an answer.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.