-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Hi! Would it make sense to have a small addition that makes the library usable in Apache Spark? Something along the lines of
package com.atomgraph.etl.json;
import org.apache.spark.sql.api.java.UDF1;
import org.apache.jena.rdf.model.Model;
public class Json2rdfUDF implements UDF1<String, String> {
private static final long serialVersionUID = 1L;
@Override
public StreamRDF call(String jsonString) throws Exception {
InputStream bis = new ByteArrayInputStream(jsonString.getBytes());
Reader reader = new BufferedReader(bis);
StreamRDF rdfStream = new CollectorStreamRDF();
new JsonStreamRDFWriter(reader, rdfStream, baseURI.toString()).convert();
return rdfStream;
}
}
Metadata
Metadata
Assignees
Labels
No labels