Skip to content
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

Predicate to link from Distribution to Dataset #1322

Closed
joepio opened this issue Mar 11, 2021 · 7 comments · Fixed by #1554
Closed

Predicate to link from Distribution to Dataset #1322

joepio opened this issue Mar 11, 2021 · 7 comments · Fixed by #1554
Labels
dcat:Dataset dcat:Distribution dcat feedback Issues stemming from external feedback to the WG inverse-properties requires discussion Issue to be discussed in a telecon (group or plenary)
Milestone

Comments

@joepio
Copy link

joepio commented Mar 11, 2021

We're implementing a Datasets and Distributions, and we have a need to link to a Dataset coming from a Distribution. Users can see a Distribution, and I want them to be able to see which Dataset it is part of. In the specification I wasn't able to find a property / predicate URL for this. Maybe I'm missing something, or maybe there's a good reason not to include this relationship. Do you have an alternative to use in this context?

@andrea-perego andrea-perego added dcat feedback Issues stemming from external feedback to the WG dcat:Distribution dcat:Dataset labels Mar 11, 2021
@andrea-perego andrea-perego added this to the DCAT3 2PWD milestone Mar 11, 2021
@andrea-perego
Copy link
Contributor

Thanks for contributing this use case, @joepio .

An inverse relationship for dcat:distribution was not present in the original version of DCAT, and it was not even included in DCAT2 as no use case or requirement was contributed about the need for such a feature.

At the moment, what you can do is to include also a statement :dataset-xyz dcat:distribution :distribution-123 . along with the description of your distribution.

Could you give us some more details about your use case, to better understand your requirements? E.g., are your metadata consumed via a SPARQL endpoint or a catalogue platform?

@joepio
Copy link
Author

joepio commented Mar 11, 2021

Thanks for replying so quickly!

At the moment, what you can do is to include also a statement :dataset-xyz dcat:distribution :distribution-123 . along with the description of your distribution.
Could you give us some more details about your use case, to better understand your requirements? E.g., are your metadata consumed via a SPARQL endpoint or a catalogue platform?

This could work in some cases, but it kind of conflicts with our linked data architecture, since it would require the server to be aware of which incoming links are relevant to a resource. Our architecture basically works like this: user fetches subject x, server returns all triples for that subject (but not incoming links or other external statements describing this resource). We use subjects to actually render resources, and we use predicates to render properties. So if a user would open the URL of a Distribution, they would see the item. In that view, I'd like to show the Dataset, but that would require the Distribution resource to have a link to the Dataset.

There's also a second usecase - we emit changes to resources in a (kafka) bus, which is used by other apps to synchronize state changes. If a Distribution is created, it is sent to the bus, but now the listening systems (e.g. a search index) need to know under which Dataset it should be nested.

@andrea-perego andrea-perego added the requires discussion Issue to be discussed in a telecon (group or plenary) label Mar 13, 2021
@riannella
Copy link

Sounds like more evidence for the requirement for inverse predicates to be defined.

@rossbowen
Copy link

Hi @riannella, I had hoped an inverse of dcat:distribution would feature in the table which appears in V3 of the spec. I think I have a requirement which could not be solved without an inverse for dcat:distribution.

I'm wanting to use DCAT alongside the CSV on the Web (CSVW) standard for describing CSV files.

I have a CSV file which is a distribution of some dcat:Dataset and described with some CSVW metadata. Within that CSVW metadata file, I want to be able to assert that the CSV I am describing is a dcat:Distribution of the dcat:Dataset.

A CSVW metadata file is valid JSON-LD, but has some strict rules about what can and cannot be included. Its test suite prohibits the use of the @reverse keyword.

A CSVW metadata file might look something as follows:

{
    "@context": ["http://www.w3.org/ns/csvw", {"@language": "en"}],
    "@id": "http://opendata.leeds.gov.uk/downloads/gritting/grit_bins.csv",
    "url": "http://opendata.leeds.gov.uk/downloads/gritting/grit_bins.csv",
    "tableSchema": {
        "columns": [
            {"name": "location"},
            {"name": "easting"},
            {"name": "northing"}
        ]
    }
}

I believe I have a need for a dcat:isDistributionOf property to relate the .csv distribution to its dcat:Dataset. Then I can describe both resources independently.

{
    "@context": ["http://www.w3.org/ns/csvw", {"@language": "en"}],
    "@id": "http://opendata.leeds.gov.uk/downloads/gritting/grit_bins.csv",
    "dcterms:title": "Grit bin locations (CSV format)",
    "dcat:isDistributionOf": {
        "@id": "https://datamillnorth.org/dataset/grit-bin-locations",
        "dcterms:title": "Grit bin locations"
    },
    "url": "http://opendata.leeds.gov.uk/downloads/gritting/grit_bins.csv",
    "tableSchema": {
        "columns": [
            {"name": "location"},
            {"name": "easting"},
            {"name": "northing"}
        ]
    }
}

Running csv2rdf over the metadata then provides the relationship between the two resources, plus a transformation of the CSV's contents into RDF.

<http://opendata.leeds.gov.uk/downloads/gritting/grit_bins.csv> <http://purl.org/dc/terms/title>
    "Grit bin locations (CSV format)"@en;
  <http://www.w3.org/ns/dcat#isDistributionOf> <https://datamillnorth.org/dataset/grit-bin-locations> .

<https://datamillnorth.org/dataset/grit-bin-locations> <http://purl.org/dc/terms/title>
    "Grit bin locations"@en .

<http://opendata.leeds.gov.uk/downloads/gritting/grit_bins.csv#646> <http://opendata.leeds.gov.uk/downloads/gritting/grit_bins.csv#easting>
    "434546.27638200000";
  <http://opendata.leeds.gov.uk/downloads/gritting/grit_bins.csv#location> "646";
  <http://opendata.leeds.gov.uk/downloads/gritting/grit_bins.csv#northing> "428380.45163300000" .

<http://opendata.leeds.gov.uk/downloads/gritting/grit_bins.csv#6212> <http://opendata.leeds.gov.uk/downloads/gritting/grit_bins.csv#easting>
    "434644.81909500000";
  <http://opendata.leeds.gov.uk/downloads/gritting/grit_bins.csv#location> "6212";
  <http://opendata.leeds.gov.uk/downloads/gritting/grit_bins.csv#northing> "428412.41143200000" .

@smrgeoinfo
Copy link
Contributor

Seems like from the DCAT perspective, the resource of interest would be a DCAT dataset with a CSVW distribution, no additional DCAT properties required. From the CSVW perspective, you are describing a particular representation (distribution) of a dataset, and want to link back to the 'abstract' (implementation independent) identifier for the dataset information. I would look for a CSVW property to link a tabular data representation of the resource to its parent information object (the implementation-independent dataset). This would be a CSVW issue

@riannella
Copy link

Hi @rossbowen - I tried, but did not convince them :-)

@rossbowen
Copy link

Thankyou - hopefully this new use-case can be considered. I agree that the issue sits with CSVW (and I think if a new working group were to convene that one of the outcomes may well be that CSVW support the whole JSON-LD dialect), but I don't think CSVW coining a new property which is effectively the same as a dcat:isDistributionOf in the CSVW namespace is the solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dcat:Dataset dcat:Distribution dcat feedback Issues stemming from external feedback to the WG inverse-properties requires discussion Issue to be discussed in a telecon (group or plenary)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants