RMLio / rmlmapper-java

The RMLMapper executes RML rules to generate high quality Linked Data from multiple originally (semi-)structured data sources
http://rml.io
MIT License
147 stars 61 forks source link

/dev/stdin support for Windows #104

Open CyberDaedalus00 opened 3 years ago

CyberDaedalus00 commented 3 years ago

I've been successfully developing RML mappings on MacOS and defining the logical source to be /dev/stdin so that the mapping files can be independent of the source.

rml:logicalSource [ rml:source "/dev/stdin" ; rml:referenceFormulation ql:JSONPath ;

When I attempt to execute on the same files and jar on Windows, it attempts to treat /dev/stdin as if it was a file name.

Does this technique work on Windows?
Shouldn't it be detecting the use of /dev/stdin and map that to actually use Java's System.in so that it could be platform neutral?

Perhaps I'm doing something wrong. I need to be able to run rml-mapper on both Unix and Windows based platforms.

Any help appreciated

Related to https://github.com/RMLio/rmlmapper-java/issues/97

CyberDaedalus00 commented 3 years ago

To add a bit more context, I'm trying to use the rml-mapper as a library to integrate into a custom Apache NiFi Processor so that the mapping can be part of a NiFi workflow.

Since the contents of the file to be mapped (e.g., JSON) is contained as a stream in the flow file, I need to be able to feed it into the executor and define in the mapping file the proper rml:source value to read the stream in.

I search around and hadn't found any one that had done this, so I've had to try to work out the details to make it work.