I need to ingest data from RDBMS(Oracle) to Stardog. For that:
I created mapping file. Although as per stardog documentation mapping file is not required and Direct Mapping can be used. however I need to have specific mapping file based on my requirement.
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX emp: <http://example.com/emp>
PREFIX dept: <http://example.com/dept>
MAPPING
FROM SQL {
SELECT emp.First_Name as fname, dept.DepartmentName as dname
from Employee as Emp, Department as dept
Where emp.ID= dept.Emp_ID
}
TO {
?emp a emp:Employee ;
emp:name ?fname;
emp:partOf ?dept.
?dept a dept:Department ;
dept:name ?dname.
}
WHERE {
BIND(template("http://example.com/emp{fname}") AS ?emp)
BIND(template("http://example.com/dept{dname}") AS ?dept)
}
Ok, we'll have to dig a little deeper. Checking the stardog.log is always a good place to start. I should have asked before, are you using the CLI or Studio?
I tried both.. However response is same.
In studio the SMS2 did not threw any error so I hope it is good.
At CLI initially SMS2 file was not in good shape so I modified based on the error . Later in no error and no response..
Exactly , I'm also facing the same issue with . I can connect the oracle db server , but while generating the SMS file/Virtual Graph it is not able to generate .
000IA2: Template must reference one or more variables: CATALOG (Bad Request) stardog
And this error occurs, any idea what it is about ?