Hi,
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)
}
- I created property file with
jdbc.url=jdbc:oracle:thin:@a.b.c.d:1521/xyz
jdbc.username=user
jdbc.password=pwd
jdbc.driver=oracle.jdbc.driver.OracleDriver
- Created a Stardog DB myDB
stardog-admin virtual import --format sms2 myDB my.properties my.sms
nothing is happening when I run the command.
Please let me know how can I debug this.
Also I have below design level queries
- Mapping blocks should be segregated based on Class or if there is any criteria?
- In case on join should we use From SQL or create View in DB and create mapping file or Join of SMS ?