submit_sparql: Submit a SPARQL Query to a Triplestore (READ)

Description Usage Arguments Details Value See Also Examples

View source: R/db-access-low-level.R

Description

In case of error, no execution-aborting condition is set! Instead an NA is returned and a warning may be issued.

Usage

1
submit_sparql(query, access_options, as_dataframe = TRUE)

Arguments

query

character. Properly formatted SPARQL query to be submitted to an endpoint.

access_options

object returned by basic_triplestore_access or api_triplestore_access.

as_dataframe

logical. TRUE by default. If TRUE, the results are returned as a data.frame.

Details

This submits to the /repositories/ endpoint, which means that only certain types (READ) of SPARQL queries are allowed. Namely SELECT, CONSTRUCT, DESCRIBE, and ASK. For UPDATE-type operations use the submit_sparql_update function.

Supported operations:

SELECT CONSTRUCT DESCRIBE ASK

Value

data.frame or object returned by the triplestore. NA if nothing found or query could not be executed.

See Also

submit_sparql_update

Examples

1
2
3
4
5
6
7
8
## Not run: 
query = "SELECT * WHERE {
  ?s ?p ?o .
} LIMIT 100"

submit_sparql(query = query, access_options = graphdb)

## End(Not run)

vsenderov/rdf4r documentation built on May 3, 2019, 4:02 p.m.