Dynamic Targets in YARRRML

Unofficial Draft

More details about this document
Latest published version:
https://w3id.org/imec/rml/yarrrml/spec/target/dynamictarget/
Latest editor's draft:
https://w3id.org/imec/rml/yarrrml/spec/target/dynamictarget/
Editors:
Els de Vleeschauwer (Ghent University – imec – IDLab)
Ben De Meester (Ghent University – imec – IDLab)
This Version
https://w3id.org/imec/rml/yarrrml/spec/target/dynamictarget/20250226/

Abstract

This extension of [YARRRML] applies the semantics specified by [RML-DYNAMIC-TARGET], an extension of [RML], dynamically defining targets based on source data.

1. Overview

This section is non-normative.

1.1 Document conventions

We assume readers have basic familiarity with [RDF], [RML] and [YARRRML] concepts.

In this document, examples assume the following namespace prefix bindings unless otherwise stated:

Prefix Namespace
rml: http://w3id.org/rml/
rmle: https://w3id.org/imec/rml/ns/extensions#
htv: http://www.w3.org/2011/http#
ex: http://example.org/
foaf: http://xmlns.com/foaf/0.1/

The examples are contained in color-coded boxes. We use the Turtle syntax [Turtle] to write RDF.

1.2 Conformance

As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.

The key word MAY in this document is to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

2. Dynamic targets

Dynamic targets generate targets based on data of a data source, referred to in this specification as generated targets. Dynamic targets are defined in the targets collections at the root of a [YARRRML] document. To describe a dynamic target, [YARRRML] is extended with following keys for targets:

source
The unique key of a source, defined in the sources collection.
Datatype: string.
id
A template generating identifiers for the generated targets with data of the source of the dynamic target.
Datatype: template.

Every target with the key source is a dynamic target. The value of the other keys of dynamic target are (dynamic) templates instead of (static) strings. These templates MAY contain references to data in the source of the mapping where the dynamic target is used. The mapping exporting its triples to the generated targets, refers to these generated targets by the id of those generated targets. For this purposing, this specification allows templates as values for the targets key within a mapping. The mapping generates the identifiers for those targets using its own data source, which is not necessarily the same data source as source of the dynamic target.

If a mapping and a dynamic target have the same data source, this mapping MAY refer to the generated targets by the unique key of that dynamic target. If a dynamic target is only used in mappings with the same source as this dynamic targets, the key id is optional for this dynamic target.

3. Examples

3.1 Dynamic target with id key

In the following example the mapping tm_people has the same data source as the dynamic target lt_persons, while the mapping tm_friends has a different data source. The mapping tm_friends can export data to the targets generated by the dynamic target lt_persons, by generating matching identifiers for the generated targets.

3.2 Dynamic target without id key

In the following example the dynamic target lt_persons doesn't need an explicit id key, because it is only used in mappings with the same data source as the dynamic target.

A. References

A.1 Normative references

[RDF]
RDF 1.1 Concepts and Abstract Syntax. W3C. 25 February 2014. W3C Recommendation. URL: https://www.w3.org/TR/rdf11-concepts/
[RFC2119]
Key words for use in RFCs to Indicate Requirement Levels. S. Bradner. IETF. March 1997. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc2119
[RFC8174]
Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words. B. Leiba. IETF. May 2017. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc8174
[RML]
RDF Mapping Language. URL: https://kg-construct.github.io/rml-resources/portal/
[Turtle]
RDF 1.1 Turtle. W3C. 25 February 2014. W3C Recommendation. URL: https://www.w3.org/TR/turtle/
[YARRRML]
YARRRML. 26 January 2023. Unofficial Draft. URL: https://w3id.org/imec/rml/yarrrml/spec/

A.2 Informative references

[RML-DYNAMIC-TARGET]
RML Dynamic Target. 13 January 2025. Unoffical Draft. URL: https://w3id.org/imec/rml/specs/target/dynamictarget