-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v2.1.0 #68
v2.1.0 #68
Conversation
Coverage Report
|
Seems to make sense for JSON but would that also work CSV or Excel files? |
Looks good to me. Does the changes also distinguishes if the object is going to be a literal or a URIREF object? For example if the data has an attribute hasOrganization and the value will be an IRI of a kitem. |
It is also supported for Excel. However, the wildcard through Implementing it for CSV is a bit more complicated since the overall parser works differently. Hence CSV is currently not supported. The old schema is still supported. The only difference is that if |
As already mentioned in the attached link to the docs above, you are able to set the xsd-type with the
|
Is it then the case that data2rdf throws an error or a warning when a user tries it in a way that is not supported? |
Yes it does! data2rdf/data2rdf/models/mapping.py Line 116 in c24164d
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although, I couldn't test it, the solution looks good to me.
Previously, the mapping schema for individuals with custom relations was not very effective and very repetitive if an individual needs e.g. multiple dataproperties from a data file.
In order to produce a graph like this...
... mapping like this would have been needed to be applied:
... on a dataset shaped like this:
However, with this PR, the schema can now be more simplified:
Please note that the dataset now can have as many individuals as needed since we are able to apply a wildcard now (
data[*]
).The
suffix
of the individual is also retrieved from the dataset oncesuffix_from_location
is set toTrue
. If set toFalse
, simply the provided value from thesuffix
key will be taken.If
source
is set, theobject_location
will be treated as a relative path of the root objects iterated from thedata[*]
.If
source
is not set, theobject_location
will be treated as absolute path. Same also applies for thesuffix
, whensuffix_from_location
is set toTrue
.See the updated docs here:
https://github.com/MI-FraunhoferIWM/data2rdf/blob/enh/mapping-for-multiple-individuals/docs/examples/abox/6_custom_relations.md