Sparnatural icon indicating copy to clipboard operation
Sparnatural copied to clipboard

Error: Two or more of the resulting columns have the same name

Open ch-sander opened this issue 8 months ago • 0 comments

Building this query below results in a console error if exported and imported again. It happens not on first built but if range classes are changed afterwards.

The NodeShape https://g17.dhi-roma.it/shacl/sparnatural-config/NATURAL_PERSON works fine, I don't think the error is specific to a shape/class.

string_decoder.js:277 Uncaught Error: Two or more of the resulting columns have the same name (?NATURAL_PERSON_13_label)
    at Object.performAction (string_decoder.js:277:10)
    at ii.parse (polyfill-ie11.min.js:40:6534)
    at ii.parse (polyfill-ie11.min.js:43:4876)
    at $t.expandSparql (SparqlFactory.ts:9:55)
    at Ru.expandSparql (SparnaturalElement.ts:192:5)
    at Ru.<anonymous> (ask/:475:30)
    at El.fireQueryUpdatedEvent (SparnaturalElement.ts:192:5)
    at El.generateQuery (SparnaturalElement.ts:192:5)
    at HTMLDivElement.<anonymous> (SparnaturalElement.ts:192:5)
    at Tu.loadQuery (SparnaturalElement.ts:192:5)
{
  "distinct": true,
  "variables": [
    {
      "termType": "Variable",
      "value": "EVENT_1"
    },
    {
      "termType": "Variable",
      "value": "date_value_1157_10"
    },
    {
      "termType": "Variable",
      "value": "NATURAL_PERSON_13"
    }
  ],
  "order": null,
  "branches": [
    {
      "line": {
        "s": "EVENT_1",
        "p": "https://g17.dhi-roma.it/shacl/sparnatural-config/property_68",
        "o": "NATURAL_PERSON_13",
        "sType": "https://g17.dhi-roma.it/shacl/sparnatural-config/EVENT",
        "oType": "https://g17.dhi-roma.it/shacl/sparnatural-config/NATURAL_PERSON",
        "values": []
      },
      "children": []
    },
    {
      "line": {
        "s": "EVENT_1",
        "p": "https://g17.dhi-roma.it/shacl/sparnatural-config/property_941",
        "o": "ENTRY_4",
        "sType": "https://g17.dhi-roma.it/shacl/sparnatural-config/EVENT",
        "oType": "https://g17.dhi-roma.it/shacl/sparnatural-config/ENTRY",
        "values": []
      },
      "children": [
        {
          "line": {
            "s": "ENTRY_4",
            "p": "https://g17.dhi-roma.it/shacl/sparnatural-config/property_1421",
            "o": "collection_1420_6",
            "sType": "https://g17.dhi-roma.it/shacl/sparnatural-config/ENTRY",
            "oType": "https://g17.dhi-roma.it/shacl/sparnatural-config/collection_1420",
            "values": [
              {
                "label": "Abgleich Per obitum 27,28,29 - Expedit. 2 1622/23",
                "rdfTerm": {
                  "type": "uri",
                  "value": "https://g17.dhi-roma.it/raw/collection_24"
                }
              }
            ]
          },
          "children": []
        }
      ]
    },
    {
      "line": {
        "s": "EVENT_1",
        "p": "https://g17.dhi-roma.it/shacl/sparnatural-config/property_96",
        "o": "DATE_9",
        "sType": "https://g17.dhi-roma.it/shacl/sparnatural-config/EVENT",
        "oType": "https://g17.dhi-roma.it/shacl/sparnatural-config/DATE",
        "values": []
      },
      "children": [
        {
          "line": {
            "s": "DATE_9",
            "p": "https://g17.dhi-roma.it/shacl/sparnatural-config/property_1047",
            "o": "date_value_1157_10",
            "sType": "https://g17.dhi-roma.it/shacl/sparnatural-config/DATE",
            "oType": "https://g17.dhi-roma.it/shacl/sparnatural-config/date_value_1157",
            "values": [
              {
                "label": "from 1.1.1622 to 1.1.1679",
                "start": "1621-12-31T23:06:32.000Z",
                "stop": "1679-01-01T23:06:31.059Z"
              }
            ]
          },
          "children": []
        }
      ]
    },
    {
      "line": {
        "s": "EVENT_1",
        "p": "https://g17.dhi-roma.it/shacl/sparnatural-config/property_97",
        "o": "NATURAL_PERSON_13",
        "sType": "https://g17.dhi-roma.it/shacl/sparnatural-config/EVENT",
        "oType": "https://g17.dhi-roma.it/shacl/sparnatural-config/NATURAL_PERSON",
        "values": []
      },
      "children": []
    }
  ],
  "limit": 10000
}

Image

tested on https://dhi-roma.github.io/g17-explorer/ask/

        <spar-natural
            id="sparnatural"
            src="https://dataria.org/static/sparnatural/config.ttl https://dataria.org/file/results/rdf/ontology/graceful17.ttl"
            endpoint="https://graph.dhi-roma.it/query"
            lang="en"
            defaultLang="en"
            distinct="true"
            limit="10000"
            maxOr="10"
            maxDepth="10"
            debug="false"
            prefixes="crm:http://www.cidoc-crm.org/cidoc-crm/ schema:http://schema.org/ skos:http://www.w3.org/2004/02/skos/core# g17:https://g17.dhi-roma.it/resources/ grace:https://w3id.org/grace/ontology/ grace_deprecated:https://g17.dhi-roma.it/ontology/ owl:http://www.w3.org/2002/07/owl# xsd:http://www.w3.org/2001/XMLSchema# prov:http://www.w3.org/ns/prov# geosparql:http://www.opengis.net/ont/geosparql# rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs:http://www.w3.org/2000/01/rdf-schema# sparnatural:http://data.sparna.fr/ontologies/sparnatural-config-core# rico:https://www.ica.org/standards/RiC/ontology# credit:https://credit.niso.org/contributor-roles/ sparnatural_datasource:http://data.sparna.fr/ontologies/sparnatural-config-datasources# sh:http://www.w3.org/ns/shacl# volipi:http://data.sparna.fr/ontologies/volipi# dash:http://datashapes.org/dash# ninox:https://dhi-roma.ninoxdb.de/#/teams/NBTkuKmSGa68zYCD4/database/t4l3rzpnsoua/ g17raw:https://g17.dhi-roma.it/raw/ wd:http://www.wikidata.org/entity/"
        ></spar-natural>

ch-sander avatar May 15 '25 17:05 ch-sander