Visualizing SPARQL results in Tableau


  • A working ODBC connection to a Virtuoso Instance
  • Any ODBC or JDBC Compliant version of Tableau or Tableau Server

(1) Open Tableau and Click on Other Databases (ODBC) .

(2) Select your Virtuoso DSN and click Connect. When prompted, enter your login credentials, and click OK .

(3) The connection attributes of your DSN will be added to Tableau’s native ODBC administrator. When these attributes are shown, click Sign In .

(4) Select any database from your Virtuoso instance, and click on New Custom SQL . Copy and paste the following query:

     AS "Actor",
     AS "Actor ID",
     AS "School ID",
             DBpedia.schoolLabel AS "School"
PREFIX dct: <>
SELECT ?actor ?school ?name ?schoolLabel
          dct:subject <> ;
          <> ?school ;
         foaf:name ?name .
        rdfs:label ?schoolLabel .
        FILTER ( LANG(?name) = "en" )
        FILTER ( LANG(?schoolLabel) = "en" )
ORDER BY ASC(?school)
) AS DBpedia

(5) Click OK to enter the Data Source window. Click Update Now to see a preview of results.

(6) Drag the required rows into the Rows field, and select Actions from the Worksheet menu .

(7) Click the Add Action > button, and select URL.

(8) Use the name text-box to select Actor as the target for hyperlink text, and Actor ID as the anchor URI target. Set Run action on to Select .

(9) Repeat for School and School ID ; then click OK .

(10) Each row item in the Actor and School columns is now anchored by a DBpedia ID (hyperlink) that resolves to an external DBpedia page that describes the entity uniquely identified by that hyperlink.

(11) For example, click on the hyperlink that identifies Al Pacino and it will resolve to his DBPedia page .

(12) You can further edit this table by removing columns and resizing the abc measurements column if desired. This demonstration can be published on Tableau Public or any Tableau Server instance.