pldn / LDWizard

🧙 LDWizard: A generic framework for simplifying the creation of linked data. Supported by the PLDN community.
European Union Public License 1.2
13 stars 7 forks source link

Enrichment cannot create IRIs #145

Closed wouterbeek closed 11 months ago

wouterbeek commented 1 year ago

When we use a SPARQL query to enrich the ID in the following source table to an IRI:

BAG ID
123

We get the following linked data:

_:b0 <{baseIri}/BAG%20ID> "123" .
_:b0 <{baseIri}/BAG%20ID> "https://data.kkg.kadaster.nl/id/gebouw/123" .

But we expect:

_:b0 <{baseIri}/BAG%ID> <https://data.kkg.kadaster.nl/id/parcel/456> .
philipperenzen commented 1 year ago

Currently, the built in Convert to IRI column refinement transformation will do this, it will replace the original value in the RDF file - not in the CSV file. A custom column refinement transformation will not do this, instead it will create a columnName-refined triple and and header in the CSV file.

Here is an example GIF of the current version of the repository, with a custom Column refinement that will add "-abc" at the end of the input value. I am using yarn dev for local development with the custom function set up in the "runtimeConfig.ts" file.

Screen Recording 2023-09-08 at 11 29 58

LDWExample.csv

Click to expand custom config const wizardConfig = { appName: "LDWizard - example", defaultBaseIri: "https://w3id.org/my-wizard/", primaryColor: "#4caf50", // green secondaryColor: "#1565c0", // blue columnRefinements: [ { label: "Add -abc at the end", type: "single" as const, description: "This transformation will take input value and add '-abc' at the end", transformation: async (term: string) => { return `${term}-abc` }, }, ], }; export default globalThis.wizardConfig = wizardConfig
philipperenzen commented 11 months ago

This has been resolved in version 3.0.0:

Please feel free to reopen this issue if it persists.

Edit:

This behaviour changed in version 3.0.2: