0

I am migrating a CSV into D8 node type which has a double field. The CSV has the following structure:

enter image description here

I am trying to migrate the year, from the header, into the first double-field subfield (as a label) and the population data for each country (Afganistan, in the example above) into the second double-field subfield.

The double-field has the following interface (the data in this example was entered manually): enter image description here

And, this is how the data is represented in the node as seen via Devel: devel output

I have tried a variety of things in my migration yaml code but I have not been able to migrate either the year nor population data. My code is below:

.
.
.
process:
  type:
    plugin: default_value
    default_value: census
  title: 'Country Name'
  field_country_code: 'Country Code'
  field_count_first:
    0:
      plugin: get
      source: 
        - 1960
.
.
.
------- also - tried -----------
.
.
.
process:
  type:
    plugin: default_value
    default_value: census
  title: 'Country Name'
  field_country_code: 'Country Code'
  field_count:
    first:
      0:
        plugin: get
        source: 
          - 1960
.
.
.

I would appreciate some help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.