The current DataPackage refactor (#2567) updates references to a replaced package member's new PID, including existing provenance relationships. This fits the current meaning of Replace: the new file is a version of the same conceptual object, its system metadata obsoletes the old PID, and its metadata and package relationships are retained.
There isn't one correct way to carry provenance through every replacement, though. An existing relationship may still apply to the replacement, may describe only the old object, or may need to be asserted through a new execution. This was discussed in #310 and at length in #653. A confirmation step was suggested as a future improvement.
When Replace affects existing provenance, show the affected relationships and ask the user which ones still apply. For example: Was replacement.csv also used by script.py?
- If a direct
wasDerivedFrom relationship is confirmed, update it to reference the replacement PID.
- If an execution-backed
used or wasGeneratedBy relationship is confirmed, create a new execution for the same program instead of changing the historical execution.
- Do not include relationships that the user does not confirm in the new Resource Map.
See:
The current DataPackage refactor (#2567) updates references to a replaced package member's new PID, including existing provenance relationships. This fits the current meaning of Replace: the new file is a version of the same conceptual object, its system metadata
obsoletesthe old PID, and its metadata and package relationships are retained.There isn't one correct way to carry provenance through every replacement, though. An existing relationship may still apply to the replacement, may describe only the old object, or may need to be asserted through a new execution. This was discussed in #310 and at length in #653. A confirmation step was suggested as a future improvement.
When Replace affects existing provenance, show the affected relationships and ask the user which ones still apply. For example:
Was replacement.csv also used by script.py?wasDerivedFromrelationship is confirmed, update it to reference the replacement PID.usedorwasGeneratedByrelationship is confirmed, create a new execution for the same program instead of changing the historical execution.See: