Created
October 26, 2018 23:55
-
-
Save chriscalip/778e877bcac4db04c44e99bb404d04d5 to your computer and use it in GitHub Desktop.
Migrating csv data to node and corresponding paragraph
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| langcode: en | |
| status: true | |
| migration_tags: | |
| - CSV | |
| - non-aa | |
| id: naw_adds_2pf_recovery_support | |
| migration_group: csvimports | |
| label: "Imports data from naw-adds-import.csv to paragraph:profile_support" | |
| dependencies: | |
| enforced: | |
| module: | |
| - capacitype_migrate | |
| source: | |
| plugin: csv | |
| path: "modules/custom/capacitype_migrate/csv/naw-adds-import.csv" | |
| header_row_count: 1 | |
| keys: | |
| - Source ID | |
| process: | |
| uid: | |
| plugin: default_value | |
| default_value: 1 | |
| 'field_meeting_info/value': meeting-info | |
| 'field_meeting_info/format': | |
| plugin: default_value | |
| default_value: 'simple_text' | |
| field_meeting_date: meeting-date | |
| field_meeting_type: meeting-type | |
| destination: | |
| plugin: entity_reference_revisions:paragraph | |
| default_bundle: profile_support |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| langcode: en | |
| status: true | |
| dependencies: | |
| enforced: | |
| module: | |
| - capacitype_migrate | |
| id: naw_adds_to_assets | |
| migration_group: csvimports | |
| label: "Imports data from naw-adds-import.csv to assets" | |
| migration_tags: | |
| - CSV | |
| - non-aa | |
| migration_dependencies: | |
| required: | |
| - naw_adds_2pf_recovery_support | |
| source: | |
| plugin: csv | |
| path: "modules/custom/capacitype_migrate/csv/naw-adds-import.csv" | |
| header_row_count: 1 | |
| keys: | |
| - Source ID | |
| process: | |
| langcode: | |
| plugin: default_value | |
| default_value: en | |
| title: Resource Name | |
| uid: | |
| plugin: default_value | |
| default_value: 332 | |
| status: | |
| plugin: default_value | |
| default_value: 1 | |
| promote: | |
| plugin: default_value | |
| default_value: 0 | |
| sticky: | |
| plugin: default_value | |
| default_value: 0 | |
| 'field_asset_description/value': Description | |
| 'field_asset_description/format': | |
| plugin: default_value | |
| default_value: 'simple_text' | |
| 'field_source_description/value': Source Description | |
| 'field_source_description/format': | |
| plugin: default_value | |
| default_value: 'simple_text' | |
| field_asset_email: Email | |
| field_asset_website: Website | |
| 'field_asset_address/country_code': | |
| plugin: default_value | |
| default_value: 'US' | |
| 'field_asset_address/administrative_area': | |
| plugin: cap_state_to_abbrev | |
| source: State | |
| 'field_asset_address/locality': City | |
| 'field_asset_address/postal_code': | |
| plugin: cap_ensure5_min_characters | |
| source: Zip | |
| 'field_asset_address/address_line1': Address 1 | |
| 'field_asset_address/address_line2': Address 2 | |
| 'field_asset_address/organization': Buiding Name | |
| field_asset_phone: Phone | |
| field_rate_source: Rate Source | |
| 'DefaultCategory': | |
| plugin: default_value | |
| default_value: 'Recovery Support' | |
| field_ref_asset_category: | |
| plugin: entity_lookup | |
| source: '@DefaultCategory' | |
| value_key: name | |
| bundle_key: vid | |
| bundle: asset_category | |
| entity_type: taxonomy_term | |
| ignore_case: true | |
| field_ref_group: | |
| plugin: cap_entity_lookup | |
| source: Group | |
| value_key: name | |
| bundle_key: vid | |
| bundle: group | |
| entity_type: taxonomy_term | |
| ignore_case: true | |
| 'InputTags': | |
| plugin: explode | |
| source: Services | |
| delimiter: ', ' | |
| field_ref_tags: | |
| plugin: entity_generate | |
| source: '@InputTags' | |
| value_key: name | |
| bundle_key: vid | |
| bundle: tags | |
| entity_type: taxonomy_term | |
| ignore_case: true | |
| field_ref_user: | |
| plugin: entity_lookup | |
| source: Editor | |
| value_key: mail | |
| entity_type: user | |
| ignore_case: true | |
| 'Caplinks': | |
| plugin: get | |
| source: | |
| - Social 1 | |
| - Social 2 | |
| - Social 3 | |
| field_asset_social: '@Caplinks' | |
| field_extended_profile/target_id: | |
| - | |
| plugin: migration | |
| migration: naw_adds_2pf_recovery_support | |
| no_stub: true | |
| source: | |
| - Source ID | |
| - | |
| plugin: extract | |
| index: | |
| - '0' | |
| field_extended_profile/target_revision_id: | |
| - | |
| plugin: migration | |
| migration: naw_adds_2pf_recovery_support | |
| no_stub: true | |
| source: | |
| - Source ID | |
| - | |
| plugin: extract | |
| index: | |
| - 1 | |
| destination: | |
| plugin: 'entity:node' | |
| default_bundle: asset |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment