SMS2 with From SQL

Hi,

I need to ingest data from RDBMS(Oracle) to Stardog. For that:

  1. 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)
}
  1. 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
  1. 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

  1. Mapping blocks should be segregated based on Class or if there is any criteria?
  2. In case on join should we use From SQL or create View in DB and create mapping file or Join of SMS ?

First place to look would be the stardog logs in stardog.log

Your other two questions are very good but I’ll let someone more knowledgeable answer that.

Thanks for your reply.
Please let me know looking at the code snippet if there is any visible problem.

Also log file is very huge in size and hold unwanted many details is there any provision to restrict the logs?

No need to send the entire thing. You can just send along any errors, warnings and stack traces.

This is the problem .. There is no error. However no data ingestion too

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..

Is the database empty before the import? How did you verify that no data was added by the import?