Hi Hasan,
Dumping results in various formats can be done by using the
*define output:format "{XX}" *
pragma, so in your case it would be:
SQL> sparql define output:format "TURTLE" CONSTRUCT ...
Other possible formats are:
-- NICE_TTL
-- RDF_XML
etc.
When using the ISQL client, use the 'set blobs on;' directive if
fetching long texts to avoid receiving a 'data truncated' warning.
i.e.:
SQL> set blobs on;
SQL> sparql define output:format ...
For CONSTRUCT the supported formats are:
TRIG, TTL, JSON, JSON;TALIS, SOAP, RDF/XML, NT, RDFA;XHTML, JSON;RES,
HTML;MICRODATA, HTML, JS, ATOM;XML, JSON;ODATA, XML, CXML;QRCODE, CXML,
HTML;UL, HTML;TR, JSON;LD, CSV, TSV, NICE_TTL, HTML;NICE_MICRODATA,
HTML;SCRIPT_LD_JSON, HTML;SCRIPT_TTL, HTML;NICE_TTL
-- Documentation links:
-- Pragmas to control the type of the result:
http://docs.openlinksw.com/virtuoso/rdfsparql.html#rdfsparqlimplementatioptragmasctr
-- List of supported formats:
http://docs.openlinksw.com/virtuoso/rdfsparql.html#rdfsparqlimplementatioptragmassfs
-- Examples:
--
http://docs.openlinksw.com/virtuoso/rdfsparql.html#anytimequeriessparqlex
--
http://docs.openlinksw.com/virtuoso/rdfsparql.html#rdfcontrollingsparqloutputtypes
In case you want to get the result into a local file, that will work:
1) insert the data into XX.ttl local file:
isql host:port dba pwd exec="set blobs on; sparql define output:format
'"TURTLE"' construct {...} from <....> where {....}" > XX.ttl
2) trim the first 9 lines so to have as content only the triples:
tail -n +9 XX.ttl > XX_new.ttl
Best Regards,
Rumi
Best Regards,
Rumi
On 13-Jun-16 9:50 AM, S.M.Shamimul Hasan wrote:
Hello,
I am running following query on Virtuoso isql.
SPARQL
CONSTRUCT
{
?infectee ?getInfectedBy ?infector
}
FROM <http://ndssl.bi.vt.edu/chicago/>
WHERE
{
?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://ndssl.bi.vt.edu/chicago/vocab/dendrogram>.
?s
<http://ndssl.bi.vt.edu/chicago/vocab/dendrogram_infectee_pid> ?infectee.
?s
<http://ndssl.bi.vt.edu/chicago/vocab/dendrogram_infector_pid> ?infector.
?s <http://ndssl.bi.vt.edu/chicago/vocab/dendrogram_iteration>
'0'^^xsd:decimal.
BIND (iri('http://ndssl.bi.vt.edu/chicago/vocab/getInfectedBy')
as ?getInfectedBy)
};
I want to dump result in "N-Triples" format. How can I do it in isql?
Thank you.
Regards,
S.M.Shamimul Hasan
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users