robot icon indicating copy to clipboard operation
robot copied to clipboard

template: How to load instance data property values that have datatypes?

Open ddooley opened this issue 3 years ago • 2 comments

I have tabular instance data with linkml related info, such as linkml:required, a true / false boolean shown below.

image

Is there a way of just controlling the datatype of the data property field in the column header, as with AT ? I mocked it up here:

image

Note some spreadsheets immediately convert "true" lowercase to TRUE after typing into a cell so ignoring caps would be handy too for a typed field.

As an aside, it would be great if robot -vvv would report a line number of template file on which error occurred. Sometimes it reports an error but there's only indirect info about which row / column was the culprit.

d.

ddooley avatar Feb 04 '22 02:02 ddooley

Just checking in here, this is relevant to me as well. I would like to import controlled values into a data property as well. @ddooley , could you solve this yourself?

EDIT: I pretty much found the solution immediately after some more trials. In case somebody else is facing the same issue:

Unique ID,Name,Class Type,Value
ID,LABEL,TYPE,I has_Value
xyz,Entity1,ClassA,0.023^^xsd:float

sRam1404 avatar Feb 20 '24 12:02 sRam1404

Sorry, somehow I didn't see this issue.

I don't have a ton of experience with LinkML, but isn't linkml:required an annotation property? So AT is appropriate. It doesn't make sense to me that 'required' would be part of the logical definition of a term.

You only use I when the column is for an object property or data property. When I is a data property, I guess it would make sense to provide a type in the ROBOT template string, and we don't support that. I would accept a PR for that feature, but unfortunately I can't commit to implementing it myself.

jamesaoverton avatar Feb 20 '24 14:02 jamesaoverton