Skip to main content

Migrate resource changes from one IRI to another

Important

This task is for advanced users only who are proficient in working with turtle files (.ttl).

Perform this task when you want to migrate changes made to a resource from the UI (the Edit layer) to another resource. This usually needs to be done when the IRI of the resource changes and you want to migrate the edit layer metadata changes to the new IRI.

To migrate the edit layer changes:

  1. Use the dwec:migratedTo predicate to define the migration of metadata from one IRI to another. Add the following triple to a .ttl file available in the ddw-catalog dataset. You can either add these to an existing ttl file or create a new one if you are migrating metadata for a large number of resources.

    Syntax:

    <IRI from which metadata has to be migrated> dwec:migratedTo <IRI to which metadata has to be migrated>

    Sample value:

    <https://imdb.linked.data.world/d/ddw-catalogs/people/JaneDoe> dwec:migratedTo <https://imdb.linked.data.world/d/ddw-catalogs/people/JohnDoe>

    Important

    Note that this removes the changes from the original IRI and moves them to the new IRI.

  2. The IRI of a resource is available on the Overview tab of the Resource details page.

    note_resource_iri.png
  3. You can use the following SPARQL query to find the IRIs of resources which are available in the Edit layer but not loaded to the Base layer.

    PREFIX : <https://satsuma-foo.linked.data.world/d/ddw-catalogs/>##edit this for your environment
    SELECT DISTINCT ?subject
    FROM NAMED :edit
    FROM NAMED :
    WHERE {    
    GRAPH :edit {        
    ?subject ?predicate ?object.        
    FILTER NOT EXISTS {            
    # if it's in the edit layer, and has a class, then it was created throught the UI
          ?subject a ?class.        
     }   
     }  
      FILTER NOT EXISTS {    
        GRAPH : {           
     ?subject ?predicate2 ?object2.  
          } 
       }
    }