How to skip row when source value matches another source value

Created on 12 September 2022, about 2 years ago
Updated 22 March 2023, over 1 year ago

Problem/Motivation

If I understand this, https://www.drupal.org/project/migrate_plus/issues/2916261#comment-14407492 β†’ , I should be able to use migrate conditions to evaluate/compare two source keys/properties. However, I've not been able to figure out how to do it successfully.

Steps to reproduce

etid and group_creator are both source keys generated by source plugin

process:
  skip_if_group_admin:
    plugin: skip_on_condition
    source: etid
    condition:
      plugin: equals
      property: group_creator
    method: row
    message: 'We skip users who are admins in group.'

This skips all rows when only the first one matched.

Nor does this:

  skip_if_group_admin:
    plugin: skip_on_condition
    method: row
    source: etid
    condition: equals
    configuration:
      property: group_creator

Returns this error: 'Exactly one of value and property must be set when using the equals condition.'

Proposed resolution

From the migrate conditions documentation, this appears to be able to do the evaluation of two source keys: https://www.drupal.org/docs/contributed-modules/migrate-conditions/migra... β†’

But, it doesn't show how to actually use it to skip or not skip a row during a migration process.

So, how does one 'Skip a row when source value matches another source value'?

πŸ’¬ Support request
Status

Closed: cannot reproduce

Version

2.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States somebodysysop

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024