Open uttam1216 opened 3 years ago
Hi @uttam1216 ,
Apologies for the late answer.
The output is a serialisation of (a part of) an RDF graph, which means that the order of the statements is undetermined. Since the RMLStreamer's goal is to generate RDF, this won't change in the near future.
However, if you need such a feature, you might add this functionality by implementing the io.rml.framework.engine.PostProcessor
trait. It will collect - if need be - all statements generated by one triples map and per input record. Then you can apply any logic - such as ordering - on these statements before emitting them to the actual output.
Hope this answers your question.
Best regards, Gerald
Hi,
RMLStreamer has made my work easy, thanks. However, the output is being generated in bottom up fashion e.g.
http://example.org/character/0 http://dbpedia.org/ontology/hairColor "blonde" . http://example.org/character/0 http://schema.org/lastName "Ketchum" . http://example.org/character/0 http://schema.org/givenName "Ash" . http://example.org/character/0 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://schema.org/Person .
http://example.org/character/1 http://dbpedia.org/ontology/hairColor "orange" . http://example.org/character/1 http://schema.org/givenName "Misty" . http://example.org/character/1 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://schema.org/Person .
Can you please suggest how to make this look top down, i.e. Person first and then his/her given Name then lastName then hairColor?
Current command that I am using to run is: (base) ukumar@eis-london:~$ flink-1.12.0/bin/flink run /home/ukumar/RMLStreamer/target/RMLStreamer-2.0.1-SNAPSHOT.jar toFile --mapping-file /home/ukumar/Desktop/rules-3.rml.ttl --output-path /home/ukumar/Desktop/out_characters.ttl