I'm wondering if it's possible to map JSON column data with the virtual graph. My thinking at first was that a mapping query like the following could let me map key-value pairs in the JSON column:
MAPPING
FROM SQL {
SELECT *
FROM "SCHEMA"."TABLE"
}
TO {
?t a :table;
:Id ?id ;
:JsonData ?jsonData .
?jsonData a :JsonData ;
:key1 ?key1 ;
:key2 ?key2
} WHERE {
BIND(StrDt(?ID, xsd:integer) AS ?id)
BIND(StrDt(?JSON_DATA, xsd:string) AS ?jsonData)
BIND(StrDt(?JSON_DATA.key1, xsd:string) AS ?key1)
BIND(StrDt(?JSON_DATA.key2, xsd:string) AS ?key2)
BIND(template("http://api.stardog.com/TABLE/ID={ID}") AS ?table)
}
However, the variable names can't have dots in them, so this doesn't work. I've also tried replacing the dots with both one and two underscores, but this doesn't work either. Is this functionality available at all, or do I have to fiddle around with the SQL query instead?