3

I would like to know how to correctly define the highwater property when using Migrate for Drupal 8. I am doing an import from a legacy non drupal database and I should be able to update only the relevant nodes whenever a column highwater changed. According to the official documentation, the solution is to use a highwater property. How to declare it? Is it a property to be set in the Plugin mapping class or is it an entry in the migrate.migration.*.yml file? Thanks!

2 Answers 2

3

You can add "high_water_property" in your migration config entity:

id: my_migration
source:
  high_water_property:
    name: changed
    alias: n

From the documentation: - high_water_property: (optional) It is an array of name & alias values (optional table alias). This high_water_property is typically a timestamp or serial id showing what was the last imported record. Only content with a higher value will be imported.

Note: The high_water_property and track_changes are mutually exclusive.

Note: If you're not using SqlBase in your source, you might also want to implement something similar as shown there.

2
  • Thanks Berdir for the answer. I will try the patch and give feedback
    – Amine
    Commented May 17, 2015 at 23:28
  • The patch has in #2485385 has been fixed. The answer below is more up to date.
    – mpp
    Commented Jun 15, 2018 at 10:46
4

highWaterProperty renamed to high_water_property, and moved from the top-level migration plugin configuration into the source plugin configuration.

id: my_migration
source:
  high_water_property:
    name: changed

For more information, see: https://www.drupal.org/node/2795403

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.