Skip to content

Conditionally creating triples #53

Answered by DylanVanAssche
rybesh asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!

You can achieve this in RMLMapper with the help of some FnO functions.
RMLMapper has several default functions included, an overview is available here

With the function if you can do a check if the column has 1 and output a constant like ex:peanuts:

# Output
dylan@work-laptop:~/Downloads$ java -jar rmlmapper-7.0.0-r374-all.jar -m mapping.ttl 
<http://example.org/1> <http://example.org/hasIngredient> <http://example.org/caramel> .
<http://example.org/1> <http://example.org/hasIngredient> <http://example.org/nougat> .
<http://example.org/1> <http://example.org/hasIngredient> <http://example.org/peanuts> .
<http://example.org/1> <http://www.w3.org/2000/01/rdf-schema#label> "Snickers" .
<…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by rybesh
Comment options

You must be logged in to vote
1 reply
@DylanVanAssche
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants