You could use the programmatic client instead of the Shell to load data into an installed instance of Rya. The shell is just a command line tool that integrates with the programmatic client.
The client: https://github.com/apache/incubator-rya/blob/master/common/rya.api/src/main/java/org/apache/rya/api/client/RyaClient.java The factory for making an Accumulo connected client: https://github.com/apache/incubator-rya/blob/master/extras/indexing/src/main/java/org/apache/rya/api/client/accumulo/AccumuloRyaClientFactory.java - Kevin -----Original Message----- From: Geoffry Roberts [mailto:[email protected]] Sent: Monday, February 26, 2018 4:46 PM To: [email protected] Subject: Re: Loading data into RYA alternatives Like I said, I get to choose my format so NTRIPLES it is. I like your second suggestion. It's all programmatic and I have a background with Hadoop so good! I am going to have a lot of files anyway. It would appear I have everything I need here. I just have to put it together my way. I see the RdfFileInputFormat, which can be set with RDFFormat. I am not sure how to use the RyaOutputFormat, but I'll give it a try. We'll see. Thanks for the help. On Mon, Feb 26, 2018 at 12:06 PM, David Lotts <[email protected]> wrote: > As David B. says, the shell is a great option: > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache > _incubator-2Drya_blob_master_&d=DwIFaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF > 7EKmrYIdfxIq10&r=F2yL1qtCQ_8QkxBRIcnBCmOspnR-2OEdiXfx4UDEJmU&m=YHcib-U > HRJxnQKWivZLUIb6r83JkvjS04UO1XRnGNgw&s=j-gXL24j8WD7LSSGNkR9D_3kuYYzHpT > l58328tGJpPM&e= extras/rya.manual/src/site/markdown/shell.md > > The load-data command can be used to load RDF Statement data in a > variety > > of formats. If only the --file option is specified, the shell will > > attempt to determine the file format by filename. To specify a > > specific format, include the --format option. Use the help load-data > > command to see a list of all available formats. > > > rya/myAccumuloInstance:rya1_> load-data --file examples/triples.nt > Detected RDF Format: N-Triples (mimeTypes=text/plain; ext=nt) Loaded > the file: 'examples/triples.nt' successfully in 1.843 seconds. > rya/myAccumuloInstance:rya1_> > > > > Also, there are several examples here if you want to make it part of > your > app: > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache > _incubator-2Drya_blob_master_&d=DwIFaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF > 7EKmrYIdfxIq10&r=F2yL1qtCQ_8QkxBRIcnBCmOspnR-2OEdiXfx4UDEJmU&m=YHcib-U > HRJxnQKWivZLUIb6r83JkvjS04UO1XRnGNgw&s=j-gXL24j8WD7LSSGNkR9D_3kuYYzHpT > l58328tGJpPM&e= extras/rya.manual/src/site/markdown/loaddata.md > > This is an excerpt from the last example on the page, using the API: > > //load data from filefinal File file = new File("ntriples.ntrips"); > conn.add(new FileInputStream(file), file.getName(), > RDFFormat.NTRIPLES, new Resource[]{}); > > I believe that > > RDFFormat.NTRIPLES > > Can be replaced with some other formats. > ​david. > -- There are ways and there are ways, Geoffry Roberts
