Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two mapping files create two R2RML mappings #136

Closed
oschihin opened this issue Aug 27, 2020 · 6 comments
Closed

Two mapping files create two R2RML mappings #136

oschihin opened this issue Aug 27, 2020 · 6 comments

Comments

@oschihin
Copy link

I wanted to split sources and mapping files, first according to "data producer" (as we have two institutions in the same data source). You can see the split and result in this commit on our mapping repo. The problem: Two files with file names mapping-stabs-ve.xrm and mapping-rie-ve.xrm create two separate R2RML mapping files. The R2RML mapping is encoded in the pipeline. I could of course change it there, too, but still would have to deal with multiple mapping files.

Wouldn't it be better to have one mapping file output in src-gen?

@mchlrch
Copy link
Member

mchlrch commented Sep 2, 2020

@oschihin If you only want one generated R2RML mapping file, then you can put all map elements into the same XRM file. The behavior that each XRM file containing one or more map elements yields a corresponding generated mapping file is on purpose like that. This makes it for example possible to manage an R2RML mapping for a relational source and a RML mapping for a XML source in the same project.

On the other hand, how you split up sources, vocabularies or templates into separate XRM files has no impact on the amount of generated mapping files.

@oschihin
Copy link
Author

oschihin commented Sep 2, 2020

@mchlrch ok, I see the point. In my case, it would be nice to have shorter mapping files. For now, they're ok, but soon will be hard to handle. But then, there's outlines etc. And I'll need additional pipelines, all doable.
Thanks, I'll close.

@oschihin oschihin closed this as completed Sep 2, 2020
@vhf
Copy link

vhf commented Sep 2, 2020

One idea would be to add an optional argument to https://github.com/Staatsarchiv-Basel-Stadt/StABS-scope2RDF/blob/ece6c44b9add62fa567096fb065f9ce217c89e7f/src/mapping-rie-ve.xrm#L1 output r2rml, for instance : output r2rml mymapping.r2rml.ttl, what do you think?

@oschihin oschihin reopened this Sep 2, 2020
@oschihin
Copy link
Author

oschihin commented Sep 3, 2020

Sounds like an interesting option, it would definitely help. One thought: Could template elements be used across different mapping files? This would allow to have simply a "template file".

@tpluscode
Copy link
Contributor

Yes, templates, as well as vocabularies, can be used anywhere in the mappings. I have created such a "template file" in my mapping project: https://github.com/wikibus/migrate-sources/blob/master/mapping/templates.xrm

oschihin referenced this issue in Staatsarchiv-Basel-Stadt/StABS-scope2RDF Sep 10, 2020
@ktk
Copy link
Member

ktk commented Feb 20, 2021

I don't see an open issue left in here, closing.

@ktk ktk closed this as completed Feb 20, 2021
@mchlrch mchlrch transferred this issue from zazuko/expressive-rdf-mapper Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants