I am trying to create a unique label for instances of a certain type by binding one of the strings returned by a stored query. The query looks something like this:
SELECT ?my_label ?record_label ?my_label_extended ?my_record_extended ?my_label_record
WHERE {
SERVICE <query://my-query> {
[] sqs:vars ?my_label, ?my_table
}
GRAPH <virtual://my-database> {
?record a ?my_table ;
rdfs:label ?record_label .
BIND (CONCAT(STR(?my_label), "-Record-") AS ?my_label_extended)
BIND (CONCAT("Record-", STR(?record_label)) AS ?my_record_extended)
BIND (CONCAT(STR(?my_label), "-Record-", STR(?record_label)) AS ?my_label_record)
}
}
The results will bind the values for ?my_label
, ?record_label
, and ?my_record_extended
but not ?my_label_extended
or my_label_record
. So it looks like there is some issue using BIND with sqs:vars
.
Placing the CONCAT directly in the SELECT as a variable works to overcome this, but I am trying to return this label in a CONSTRUCT query so I believe using BIND is the correct/only option.
Any thoughts on what might be going on here?