|
From: Alex M. <ale...@gm...> - 2015-11-10 13:28:29
|
Thanks Brad,, That did work out great.. Thanks Regards Alex www.tilogeo.com On Tue, Nov 10, 2015 at 4:03 AM, Brad Bebee <be...@sy...> wrote: > Alex, > > What should be working is something like: > > curl -X POST -H 'Content-Type:application/xml' --data-binary @data.rdf > http://62.59.40.122:9999/bigdata/sparql?context-uri=http://abc.com/id/graph/xyz <http://62.59.40.122:9999/bigdata/sparql?c=http://abc.com/id/graph/xyz> > > curl -X POST http://62.59.40.122:9999/bigdata/sparql > --data-urlencode 'query=construct where {?s ?p ?o}' -H 'Accept: application/rdf+xml' --data-urlencode 'named-graph-uri=http://abc.com/id/graph/xyz <http://62.59.40.122:9999/bigdata/sparql?c=http://abc.com/id/graph/xyz>' > > > Let us know how if that works on your end. > > Thanks, --Brad > > > > > > On Mon, Nov 9, 2015 at 5:39 PM, Alex Muir <ale...@gm...> wrote: > >> I've tried various means of encoding the components but I always get the >> same service description results or notifications about encoding and >> expected data. Can't seem to get the right combination. >> >> Hope someone out there can give an example of curl that imports rdf and >> exports the same ref using context... >> >> Is there any difference between these? It seems different names for the >> same concept in the rest api. Is that correct? >> >> named-graph-uri= >> The Context (aka Named Graph) c= >> context-uri= >> >> Thanks >> >> >> >> >> >> Regards >> Alex >> www.tilogeo.com >> >> On Mon, Nov 9, 2015 at 9:44 PM, Martynas Jusevičius < >> mar...@gr...> wrote: >> >>> *Note that.. >>> >>> On Mon, Nov 9, 2015 at 10:39 PM, Martynas Jusevičius < >>> mar...@gr...> wrote: >>> >>>> Not sure what the command line does, better if you send the full >>>> request URI. >>>> >>>> Not that you only have to encode the components, such as querystring >>>> params/values, not the whole URI. >>>> >>>> On Mon, Nov 9, 2015 at 10:37 PM, Alex Muir <ale...@gm...> >>>> wrote: >>>> >>>>> oops.. actually sorry that was not true... had a bug in that.. :) >>>>> >>>>> >>>>> Regards >>>>> Alex >>>>> www.tilogeo.com >>>>> >>>>> On Mon, Nov 9, 2015 at 9:34 PM, Alex Muir <ale...@gm...> >>>>> wrote: >>>>> >>>>>> Hi martynas, >>>>>> >>>>>> Sorry sent that last one by accident.. >>>>>> >>>>>> I get the same result with the following, encoding the url. >>>>>> >>>>>> URLENCODE=$(cat $1?named-graph-uri=$2 | xxd -plain | tr -d '\n' | sed >>>>>> 's/\(..\)/%\1/g') >>>>>> curl -H "Accept: application/rdf+xml" $URLENCODED -o $3/$4.rdf >>>>>> >>>>>> >>>>>> >>>>>> Regards >>>>>> Alex >>>>>> www.tilogeo.com >>>>>> >>>>>> On Mon, Nov 9, 2015 at 9:31 PM, Alex Muir <ale...@gm...> >>>>>> wrote: >>>>>> >>>>>>> I get the same result >>>>>>> >>>>>>> >>>>>>> >>>>>>> Regards >>>>>>> Alex >>>>>>> www.tilogeo.com >>>>>>> >>>>>>> On Mon, Nov 9, 2015 at 6:28 PM, Martynas Jusevičius < >>>>>>> mar...@gr...> wrote: >>>>>>> >>>>>>>> Are your query parameters percent-encoded? >>>>>>>> https://en.wikipedia.org/wiki/Percent-encoding >>>>>>>> >>>>>>>> On Mon, Nov 9, 2015 at 7:11 PM, Alex Muir <ale...@gm...> >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Hi Bryan, >>>>>>>>> >>>>>>>>> I've tried that and a number of methods. On export though I get >>>>>>>>> data that I guess is a description for the service. >>>>>>>>> >>>>>>>>> Can blazegraph create some specific examples to show how to >>>>>>>>> accomplish this using curl? The task is to load an rdf xml file and then >>>>>>>>> export the same file using a named graph. >>>>>>>>> >>>>>>>>> I'm evaluating the system for a large client and have completed >>>>>>>>> this task for other systems but I'm not clear on how to do this with the >>>>>>>>> given documentation. >>>>>>>>> >>>>>>>>> [exec] <rdf:RDF >>>>>>>>> [exec] xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> >>>>>>>>> [exec] >>>>>>>>> [exec] <rdf:Description rdf:nodeID="service"> >>>>>>>>> [exec] <rdf:type rdf:resource="http://www.w3.org/ns/sparql-service-description#Service"/> >>>>>>>>> [exec] <endpoint xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://52.89.40.122:9999/bigdata/sparql"/> >>>>>>>>> [exec] <endpoint xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://52.89.40.122:9999/bigdata/LBS/sparql"/> >>>>>>>>> [exec] <supportedLanguage xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/sparql-service-description#SPARQL10Query"/> >>>>>>>>> [exec] <supportedLanguage xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/sparql-service-description#SPARQL11Query"/> >>>>>>>>> [exec] <supportedLanguage xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/sparql-service-description#SPARQL11Update"/> >>>>>>>>> [exec] <feature xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/sparql-service-description#BasicFederatedQuery"/> >>>>>>>>> [exec] <feature xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/sparql-service-description#UnionDefaultGraph"/> >>>>>>>>> [exec] <feature xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.bigdata.com/rdf#/features/KB/Mode/Quads"/> >>>>>>>>> [exec] <inputFormat xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/formats/RDF_XML"/> >>>>>>>>> [exec] <inputFormat xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/formats/N-Triples"/> >>>>>>>>> [exec] <inputFormat xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/formats/Turtle"/> >>>>>>>>> [exec] <inputFormat xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/formats/N3"/> >>>>>>>>> [exec] <inputFormat xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.wiwiss.fu-berlin.de/suhl/bizer/TriG/Spec/"/> >>>>>>>>> [exec] <inputFormat xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://sw.deri.org/2008/07/n-quads/#n-quads"/> >>>>>>>>> [exec] <inputFormat xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/formats/SPARQL_Results_XML"/> >>>>>>>>> [exec] <inputFormat xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/formats/SPARQL_Results_JSON"/> >>>>>>>>> [exec] <inputFormat xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/formats/SPARQL_Results_CSV"/> >>>>>>>>> [exec] <inputFormat xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/formats/SPARQL_Results_TSV"/> >>>>>>>>> [exec] <resultFormat xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/formats/RDF_XML"/> >>>>>>>>> [exec] <resultFormat xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/formats/N-Triples"/> >>>>>>>>> [exec] <resultFormat xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/formats/Turtle"/> >>>>>>>>> [exec] <resultFormat xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/formats/N3"/> >>>>>>>>> [exec] <resultFormat xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.wiwiss.fu-berlin.de/suhl/bizer/TriG/Spec/"/> >>>>>>>>> [exec] <resultFormat xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/formats/SPARQL_Results_XML"/> >>>>>>>>> [exec] <resultFormat xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/formats/SPARQL_Results_JSON"/> >>>>>>>>> [exec] <resultFormat xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/formats/SPARQL_Results_CSV"/> >>>>>>>>> [exec] <resultFormat xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/formats/SPARQL_Results_TSV"/> >>>>>>>>> [exec] <entailmentRegime xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:resource="http://www.w3.org/ns/entailment/Simple"/> >>>>>>>>> [exec] <defaultDataset xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:nodeID="defaultDataset"/> >>>>>>>>> [exec] </rdf:Description> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> Regards >>>>>>>>> Alex >>>>>>>>> www.tilogeo.com >>>>>>>>> >>>>>>>>> On Mon, Nov 9, 2015 at 1:46 PM, Bryan Thompson <br...@sy...> >>>>>>>>> wrote: >>>>>>>>> >>>>>>>>>> Alex, >>>>>>>>>> >>>>>>>>>> I believe that you should be using the parameters defined at [1] >>>>>>>>>> for SPARQL UPDATE. Notably, replace ?c=... with >>>>>>>>>> using-named-graph-uriSpecify zero or more named graphs for this >>>>>>>>>> the update request (protocol option with the same semantics as USING NAMED). >>>>>>>>>> >>>>>>>>>> This is per the SPARQL UPDATE specification. >>>>>>>>>> >>>>>>>>>> Thanks, >>>>>>>>>> Bryan >>>>>>>>>> >>>>>>>>>> [1] >>>>>>>>>> https://wiki.blazegraph.com/wiki/index.php/REST_API#UPDATE_.28SPARQL_1.1_UPDATE.29 >>>>>>>>>> >>>>>>>>>> ---- >>>>>>>>>> Bryan Thompson >>>>>>>>>> Chief Scientist & Founder >>>>>>>>>> SYSTAP, LLC >>>>>>>>>> 4501 Tower Road >>>>>>>>>> Greensboro, NC 27410 >>>>>>>>>> br...@sy... >>>>>>>>>> http://blazegraph.com >>>>>>>>>> http://blog.blazegraph.com >>>>>>>>>> >>>>>>>>>> Blazegraph™ <http://www.blazegraph.com/> is our ultra >>>>>>>>>> high-performance graph database that supports both RDF/SPARQL and >>>>>>>>>> Tinkerpop/Blueprints APIs. Blazegraph is now available with GPU >>>>>>>>>> acceleration using our disruptive technology to accelerate >>>>>>>>>> data-parallel graph analytics and graph query. >>>>>>>>>> >>>>>>>>>> CONFIDENTIALITY NOTICE: This email and its contents and >>>>>>>>>> attachments are for the sole use of the intended recipient(s) and are >>>>>>>>>> confidential or proprietary to SYSTAP. Any unauthorized review, use, >>>>>>>>>> disclosure, dissemination or copying of this email or its contents or >>>>>>>>>> attachments is prohibited. If you have received this communication in >>>>>>>>>> error, please notify the sender by reply email and permanently delete all >>>>>>>>>> copies of the email and its contents and attachments. >>>>>>>>>> >>>>>>>>>> On Sun, Nov 8, 2015 at 1:49 PM, Alex Muir <ale...@gm...> >>>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>>> Hi, >>>>>>>>>>> >>>>>>>>>>> Using the REST API how do I export the same data file that I uploaded? >>>>>>>>>>> >>>>>>>>>>> I'm unclear with the BLAZEGRAPH REST API on the method to associate a named graph on upload and export that same named graph. >>>>>>>>>>> >>>>>>>>>>> With the following >>>>>>>>>>> >>>>>>>>>>> curl -X POST -H 'Content-Type:application/xml' --data-binary @data.rdf >>>>>>>>>>> http://62.59.40.122:9999/bigdata/sparql?c=http://abc.com/id/graph/xyz >>>>>>>>>>> >>>>>>>>>>> curl -X POST http://62.59.40.122:9999/bigdata/sparql >>>>>>>>>>> --data-urlencode 'query=named-graph-uri http://abc.com/id/graph/xyz' -H 'Accept: application/rdf+xml" | gzip > data.rdf.gz >>>>>>>>>>> >>>>>>>>>>> I get data exported but not the same large file that I inserted. >>>>>>>>>>> >>>>>>>>>>> Regards >>>>>>>>>>> Alex >>>>>>>>>>> www.tilogeo.com >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ------------------------------------------------------------------------------ >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Bigdata-developers mailing list >>>>>>>>>>> Big...@li... >>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/bigdata-developers >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ------------------------------------------------------------------------------ >>>>>>>>> Presto, an open source distributed SQL query engine for big data, >>>>>>>>> initially >>>>>>>>> developed by Facebook, enables you to easily query your data on >>>>>>>>> Hadoop in a >>>>>>>>> more interactive manner. Teradata is also now providing full >>>>>>>>> enterprise >>>>>>>>> support for Presto. Download a free open source copy now. >>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140 >>>>>>>>> _______________________________________________ >>>>>>>>> Bigdata-developers mailing list >>>>>>>>> Big...@li... >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/bigdata-developers >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> >> >> ------------------------------------------------------------------------------ >> Presto, an open source distributed SQL query engine for big data, >> initially >> developed by Facebook, enables you to easily query your data on Hadoop in >> a >> more interactive manner. Teradata is also now providing full enterprise >> support for Presto. Download a free open source copy now. >> http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140 >> _______________________________________________ >> Bigdata-developers mailing list >> Big...@li... >> https://lists.sourceforge.net/lists/listinfo/bigdata-developers >> >> > > > -- > _______________ > Brad Bebee > CEO, Managing Partner > SYSTAP, LLC > e: be...@sy... > m: 202.642.7961 > f: 571.367.5000 > w: www.blazegraph.com > > Blazegraph™ <http://www.blazegraph.com> is our ultra high-performance > graph database that supports both RDF/SPARQL and Tinkerpop/Blueprints > APIs. Mapgraph™ <http://www.systap.com/mapgraph> is our disruptive new > technology to use GPUs to accelerate data-parallel graph analytics. > > CONFIDENTIALITY NOTICE: This email and its contents and attachments are > for the sole use of the intended recipient(s) and are confidential or > proprietary to SYSTAP, LLC. Any unauthorized review, use, disclosure, > dissemination or copying of this email or its contents or attachments is > prohibited. If you have received this communication in error, please notify > the sender by reply email and permanently delete all copies of the email > and its contents and attachments. > |