How to configure edge property to predicate in R2RML or SMS2

I able to define edge property to predicate in turtle (.ttl) while loading data into stardog server like below:

:Alice	:MemberOf 	{
					:role:		"Manager";
					:since:		"2010" ;
					:status:	"Active"
					}	:Department_HR .

How define the above mapping of edge property in R2RML or SMS2 while creating virtual graph.

The edge properties feature is fairly new so I'm not sure if it's been integrated everywhere you'd expect it but the quickest way to find out would be to just give it a try. SMS and SMS2 is based on turtle so it should be fairly easy to make a reasonable guess how it might be implemented.

    SELECT name, department, role, since, status FROM sometable where name = "alice"
}  TO {
    ?name :MemberOf 	{
					:role:		?role;
					:since:		?since ;
					:status:	        ?status
					}	?department .
  BIND (template("{name}") AS ?employeeUri)

Or some such suitable mapping. Give it a try and see what's happens. I'd imaging the curly brackets in the edge properties might be problematic so you can try it with the other syntax that uses angle brackets as well.

<<:Alice :memberOf :HRDepartment >> :role ?role; :since ?since, :status ?status .

I tried earlier in both SMS2 and R2RML, not working.

This is my sample r2rml mapping file:

prefix : <>
prefix rr: <>

    a rr:TriplesMap ;
	rr:subjectMap [
		rr:template "{id}" ;
		rr:class :Employee
	] ;
	rr:predicateObjectMap [
		rr:predicate :first_name ;
		rr:objectMap [ rr:column "first_name" ]
	] ;
	rr:predicateObjectMap [
		<<rr:predicate :phone>> "phone_type": rr:objectMap [rr:column "phone_type"];
		rr:objectMap [ rr:column "phone" ]
	] ;
	rr:logicalTable [ rr:sqlQuery "SELECT * FROM master.employee" ] .

Could you please tell me how can I configure phone_type edge property to phone?


Stardog doesn't currently support mapping edge properties with virtual graphs.


Is there any plan to include it in near future?


There's. We have open tickets for integrating edge properties with other parts of the knowledge graph platform, and VGs/reasoning are on top of that list. But there's no tentative date yet.


What s the state of standards efforts for modeling and reasoning about edge properties?

I don't think the reasoning issue has been discussed in detail yet. Right now people still seem to be talking more about various aspects of the RDF* semantics, e.g. whether adding an edge property for a triple should add the triple itself. There's a mailing list at the W3C, you can take a look:


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.