0 ×

SPARQL Query

StreamableKNIME Semantic Web Nodes version 4.2.0.v201912131004 by KNIME AG, Zurich, Switzerland

This node can be connected with Semantic Web endpoints to perform SELECT queries. Please note that based on the connected endpoint, same data and same queries may lead to different results. For instance, the following SELECT query

SELECT * WHERE {?s ?p ?o}
queries all triples in the default graph, if an In-Memory Endpoint is connected. A Virtuoso database (by Virtuoso Endpoint ) will reutrn all triples present in the database.
To query specific graphs, e.g. graphs named a and b, the query with an In-Memory Endpoint is
SELECT * WHERE { { GRAPH <a> { ?s ?p ?o } } UNION { GRAPH <b> { ?s ?p ?o } } }
But with a Virtuoso database it is
SELECT * FROM NAMED <a> FROM NAMED <b> WHERE { GRAPH ?graph { ?s ?p ?o } }


The N-Triples format for the query result is necessary to be kept if you want to insert the triples in an endstore. This is especially imporant for (typed) literals. If the N-Triples format is not preserved type information will get lost (a String representation of the literal is returned). For URIs the angled brackets are not preserved, which are necessary for insertion. Here is an example showing triples with and without format preservation:
Preservesub pred object
Yes<http://expl.org/expl><http://expl.org/integer>4
Nohttp://expl.org/explhttp://expl.org/integer4
Yes<http://expl.org/expl><http://expl.org/string>"4"
Nohttp://expl.org/explhttp://expl.org/string4
Yes<http://expl.org/expl><http://expl.org/string>"sometstring"@en
Nohttp://expl.org/explhttp://expl.org/stringsometstring
Yes<http://expl.org/expl><http://expl.org/own>"123k"^^<http://expl.org/owntype>
Nohttp://expl.org/explhttp://expl.org/own123k


Functionality is provided using the Apache Jena Framework

Options

SPARQL SELECT Query
The SPARQL query. Only SELECT queries are permitted.
Preserve N-Triples format
Whether the N-Triples format should be preserved.
Timeout
Timeout for query execution.

Input Ports

Icon
Semantic Web connection

Output Ports

Icon
Buffered Data Table containing query results

Best Friends (Incoming)

Best Friends (Outgoing)

Workflows

Installation

To use this node in KNIME, install KNIME Semantic Web from the following update site:

KNIME 4.2

A zipped version of the software site can be downloaded here.

You don't know what to do with this link? Read our NodePit Product and Node Installation Guide that explains you in detail how to install nodes to your KNIME Analytics Platform.

Wait a sec! You want to explore and install nodes even faster? We highly recommend our NodePit for KNIME extension for your KNIME Analytics Platform. Browse NodePit from within KNIME, install nodes with just one click and share your workflows with NodePit Space.

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.