Alex
Alex

Reputation: 350

How to construct RDF using Data Cube Vocabulary with SPARQL

I have CSV data set and I want to construct RDF using Data Cube Vocabulary.

Now I have triplifier, which constructs "regular" RDF with tarql:

PREFIX data1: <http://data1/#>
PREFIX data2: <http://data2/#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dbo: <http://dbpedia.org/ontology/#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>

CONSTRUCT {
  ?URI a data1:Data1;
    variale:name ?name;
    variable:something ?something;
}

  FROM <file:data2.csv>

  WHERE {
    BIND (URI(CONCAT('http://data1/', ?someValue)) AS ?URI)
    BIND (STRLANG(?someName, "en")  AS ?name) 
    BIND (xsd:string(?anotherValue) AS ?value)
  }

OFFSET 1

I can find some explanations about how result RDF with Data Cube should look like, but I've found no examples about constructing it.

Here is the dataset I'm trying to process.

Upvotes: 2

Views: 368

Answers (1)

Ben Companjen
Ben Companjen

Reputation: 1443

SPARQL can produce tabular data from RDF data using SELECT queries, or RDF data from RDF data using CONSTRUCT queries, but SPARQL is not suitable for converting CSV tabular data into RDF.

Upvotes: 0

Related Questions