Hi Julia,

I checked the source code and this importer indeed requires a primary key 
declaration using dash:uriStart at the source and target classes of the 
crosswalk. You can in principle add such primary key declarations to any class 
(using Ontologies). However, as you can see from

https://datashapes.org/constraints.html#PrimaryKeyConstraintComponent
there are additional assumptions on the URIs of the instances of such classes. 
So for example if you have a Data Graph and add a primary key constraint then 
all instances need to start with the provided uriStart and also declare a value 
for the primary key property. Unless all your instances have been created using 
that pattern, this is unlikely and would break the mapping. I assume if you 
want to map from a Data Graph to an Ontology, you mean classes, and classes 
cannot really have a primary key as this would require adding a dash:uriStart 
to rdfs:Class and that would break existing classes.

TopBraid supports various other means of importing spreadsheets that are more 
flexible than the above importer. If you have some basic JavaScript experience, 
see

https://archive.topquadrant.com/doc/7.4/scripting/importing.html#importing-spreadsheets
as a technique to define arbitrary importers.

Does this help?

Holger


> On 5 Dec 2022, at 10:45 am, Julia S. <[email protected]> wrote:
> 
> Hi, I am trying to upload crosswalks using spreadsheets.
> 
> This works perfectly fine using two reference data sets (with primary keys). 
> However not at all when I try to crosswalk from i.e. data graph to ontology.
> 
> I guess my question is this: Can I set a primary key in a data graph and/or 
> ontology.
> I played around with the property panel to see if I could simply add it there 
> and the "derive missing classes" options, but have not been successful so 
> far. 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/636d9a34-1107-41e4-8b3a-fd17890da03an%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/636d9a34-1107-41e4-8b3a-fd17890da03an%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/62F9BC38-B5D1-40C8-996D-D5DDC2C7EA0C%40topquadrant.com.

Reply via email to