sparql-logo

Views SPARQL Query Backend.

This module provides SPARQL Query backend for Views 3.
To use VARQL you shouldn't necessarily be fluent in writing SPARQL queries, cause the module uses Views' fields, arguments and filters in generating a sparql query to query a sparql endpoint, and then bring these data back into your view.

VARQL utilizes Drupal 7 built-in rdf mapping in building SPARQL queries; for example if you want to select a couple of recored from DBedia, namely, name and homepage, varql will map these fields to foaf:name and foaf:homepage respectively to build its query

Requirements

Roadmap

  • Only views fields are supported at the moment. support for filters, arguments and relationships should be added soon.

Installation

  • Install varql and dependencies: views, views_ui, rdfx, rdfui, evoc, varql, sparql_endpoint.

Similar modules

  • SPARQL Views. sparql views module is also used to run sparql queries, but you have to write the sparql qeury yourself.

Credits

  • This module is written as an alternative to sparql_views module, however, varql is hugely inspired by sparql_views.

Example

  • after installing varql and required modules, add an endpoint at admin/structure/sparql_registry (for example, title: DBpedia, endpoint: http://dbpedia.org/sparql).
  • Add a content type named Profile, then add two fields (e.g. page and homepage), and configure their rdf mapping to foaf:page and foaf:homepage respectively (check [rdf] for detailed description on mapping drupal fields to RDF predicates).
  • Create a new view with type: VARQL.
  • Add a couple fields to the view (e.g. page and homepage fields since we know for sure that they have a proper rdf mapping).
  • In 'Query settings', select "DBpedia" as an endpoint.
  • Guess what? now you can preview this view to find that it pulls its data from dbpedia.

Appendices

Project Information

Downloads