Skip to content

Object type 'iri' discarded as of second source in a mapping that has multiple sources #137

@mvanbrab

Description

@mvanbrab

Issue type: 🐛 Bug

Description

When defining a mapping that contains a type specification ~iri for the object, that type specification is discarded as of the second source.

Example input (see also file fx.yarrrml.yml in attached zip):

prefixes:
  ex: "http://example.com/ex/"

mappings:
  m1:
    sources:
      - ['f1.csv~csv']
      - ['f2.csv~csv']
    s: ex:$(Id)
    po:
      - [ex:myProperty, ex:myObject~iri]

Example yarrrml-parser output (partial copy from file fx.rml.ttl in attached zip) - the last rr:Literal should have been rr:IRI:

(...)
:om_000 a rr:ObjectMap;
    rr:constant "http://example.com/ex/myObject";
    rr:termType rr:IRI.
(...)
:om_001 a rr:ObjectMap;
    rr:constant "http://example.com/ex/myObject";
    rr:termType rr:Literal.

Example rmlmapper output (for reference only): see file fx.generated.ttl in attached zip.

Steps

Expand attached zip.

Run the commands a shown in file fx.sh. This file assumes an installed yarrrml-parser and rml-mapper at the locations shown in the variable declarations on top of that file. File fx.log shows the console output of my run.

Environment

Platform:
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

Java:
openjdk version "14.0.2" 2020-07-14
OpenJDK Runtime Environment Zulu14.29+23-CA (build 14.0.2+12)
OpenJDK 64-Bit Server VM Zulu14.29+23-CA (build 14.0.2+12, mixed mode, sharing)

Node:
v14.16.1

yarrrml-parser:
1.3.1

rml-mapper:
rmlmapper-4.12.0.jar

Attachments

attachment.zip

  • fx.yarrrrml.ttl: yarrrml-parser input
  • fx.rml.ttl: yarrrml-parser output
  • fx.generated.ttl: rml-mapper output
  • fx.sh: bash script to reproduce the output
  • fx.log: my console output of fx.sh
  • f1.csv: first source
  • f2.csv: second source

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions