I'm trying to migrate from Google Sheets into Drupal 8.9+. I have successfully configured most of the migration, but am having trouble migrating two source link fields (Event URL & Ticketing URL) into ONE multi-value links field (field_links) in my target node. I'm trying to shape all the source data in my Google Sheet so I don't have to use custom process plugins.
I found this Github Gist that led me to believe I could shape the two url fields I have in Google sheets into an array, and have that array be processed by the iterator (now, sub_process) plugin. So I now have a source column called "LinksArray" that merges the data from my "Event URL" and "Ticking URL" columns to create an array that looks exactly like this:
[ ['title' => 'Event URL', 'uri' => 'https://coolvenue.com/etc'], ['title' => 'Ticketing URL', 'uri' => 'https://tickets.com/etc'], ];
And the relevant migration file looks like this:
... - name: src_links_array label: "LinksArray" selector: linksarray ... field_links: - plugin: skip_on_empty method: process source: src_links_array message: 'field_links is empty. Skipping.' - plugin: sub_process process: title: title uri: uri
When I run the migration, It appears to be successful, with no errors, but the content created is missing the links altogether (no titles, no uri's, nothing), so is obviously not working. I tried reformatting the array with and without outer brackets, with and without trailing commas, etc. Nothing works. Is my manually created array being written incorrectly? Do I need to create the array inside the migration instead? If so, I'd greatly appreciate help with that. Thank you!