CONSTRUCT with distinct values

19 views
Skip to first unread message

Luí­s Moreira de Sousa

unread,
Jan 11, 2023, 10:50:18 AM1/11/23
to ta...@googlegroups.com
Dear all,

I am trying to build a knowledge graph from a non-normalised CSV file. Therefore it requires the selection of distinct values to avoid duplicated triples.

Against a triple store I perform that kind of CONSTRUCT with a sub-query applying the DISTINCT selection. Tarql parses that formulation without error, but returns an empty knowledge graph (log below).

Is there something wrong with the CONSTRUCT? Or is there a different strategy to address non-normalised data with tarql?

Thank you for reading.

$ cat select.sparql
SELECT DISTINCT ?id
WHERE {}

$ tarql select.sparql data.csv
-------
| id  |
=======
| "1" |
| "2" |
| "3" |
-------

$ cat construct.sparql

CONSTRUCT {
    ?id rdf:type vcard:Individual .
}
WHERE {
        SELECT DISTINCT ?id
        WHERE {}
}

$ tarql construct.sparql data.csv
$

--
Luís

Sent with Proton Mail secure email.
Reply all
Reply to author
Forward
0 new messages