The query that you mentioned earlier was

INSERT {
        ?tbeOrgID a <https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91> .
        ?division skos:prefLabel ?orgNameString .
        ?division <https://schema.somecompany.com/ontologies/somecompany_organization#org_id> ?orgString .
    }
    WHERE {
        BIND (ui:jsonValue(?json, "results") AS ?array) .
        ?array ui:jsonArrayMembers ?object .
        BIND (ui:jsonValue(?object, "org_id") AS ?orgID) .
        BIND (ui:jsonString(?orgID) AS ?orgString) .
        BIND (spif:buildURI("https://schema.somecompany.com/ontologies/scorg#b363fc0a-2c2c-11b2-80af-001dd8b72b91") AS ?division) .
        BIND (ui:jsonValue(?object, "org_name") AS ?orgName) .
        BIND (ui:jsonString(?orgName) AS ?orgNameString) .
        BIND (spif:generateUUID() AS ?tbeOrgID) .
}

However, in the INSERT this query seems to use the same value for ?division in each iteration. Try replacing the spif:buildURI line with

    BIND (BNODE() AS ?division)

This would produce a different blank node for each array member.

HTH
Holger




On 18/01/2020 12:50, Michael Phelan wrote:
Please note that the class ID global identifier would be unique for each of the records (in my second example I just pasted in the same ID for all three items).

On Saturday, January 18, 2020 at 3:48:27 PM UTC-5, Michael Phelan wrote:

    Thank you very much for your additional advice.

    "Not well-formed tuples" is likely the wrong terminology. To put
    things literally, I currently am producing the first example
    below, and I need to be producing the second example below.

    First example:
    |
    
<https://schema.somecompany.com/ontologies/scorg#b363fc0a-2c2c-11b2-80af-001dd8b72b91
    
<https://schema.somecompany.com/ontologies/scorg#b363fc0a-2c2c-11b2-80af-001dd8b72b91>>
    <http://www.w3.org/2004/02/skos/core#prefLabel
    <http://www.w3.org/2004/02/skos/core#prefLabel>>
                   "A1" , "A2" , "A3";
    <https://schema.somecompany.com/ontologies/somecompany_organization#org_id
    <https://schema.somecompany.com/ontologies/somecompany_organization#org_id>>
                   "Acme" , "Bachman" , "Connor" .
    |


    Second example:
    |
    scorg:b363fc0a-2c2c-11b2-80af-001dd8b72b91
    <https://schema.somecompany.com/ontologies/somecompany_organization#org_id
    <https://schema.somecompany.com/ontologies/somecompany_organization#org_id>>
      "A1" ;
      rdf:type
     
<https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91
    
<https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91>>
    ;
      <http://www.w3.org/2004/02/skos/core#prefLabel
    <http://www.w3.org/2004/02/skos/core#prefLabel>>  "Acme" .

    scorg:b363fc0a-2c2c-11b2-80af-001dd8b72b91
    <https://schema.somecompany.com/ontologies/somecompany_organization#org_id
    <https://schema.somecompany.com/ontologies/somecompany_organization#org_id>>
      "A2" ;
     rdf:type
     
<https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91
    
<https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91>>
    ;
     <http://www.w3.org/2004/02/skos/core#prefLabel
    <http://www.w3.org/2004/02/skos/core#prefLabel>>  "Bachman" .

    scorg:b363fc0a-2c2c-11b2-80af-001dd8b72b91
    <https://schema.somecompany.com/ontologies/somecompany_organization#org_id
    <https://schema.somecompany.com/ontologies/somecompany_organization#org_id>>
      "A3" ;
    rdf:type
     
<https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91
    
<https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91>>
    ;
    <http://www.w3.org/2004/02/skos/core#prefLabel
    <http://www.w3.org/2004/02/skos/core#prefLabel>>  "Connor" .
    |



    On Friday, January 17, 2020 at 4:10:45 PM UTC-5, Irene Polikoff
    wrote:

        Are you saying that your SPARQL generates label and id
        triples, but fails to generate type triples such as

        |
        scorg:b363fc0a-2c2c-11b2-80af-001dd8b72b91
           rdf:type
         
<https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91
        
<https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91>>
        ;
        |

        And this is your problem?

        I am confused by your terminology of “not well-formed tuples”.
        I am not sure what this means in this context. Do you mean
        that some triples that you are expecting to generate for each
        subject are missing?

        This would happen if a variable you are using to construct
        triples was unbound.

        For example:

        SPARQL INSERT {?s a ?o1.
        ?s rdtfs:label ?o2.}

        If let's say ?o1 was unbound then you would not get the type
        triple. If ?o2 was unbound, you would not get the label
        triple. If ?s was unbound you would not get neither of the
        triples.

        On Jan 17, 2020, at 3:35 PM, Michael Phelan
        <[email protected]> wrote:

        The RDF I provided at the beginning was entirely produced
        using the TopBraid EDG web interface's taxonomy editor. My
        goal is to produce a large number of tuples in the same
        taxonomy which have the same form as the A1 test org, but
        with details taken from the data provided by the JSON
        document. At present, the SPARQL I provided produces the
        org_id tuple data in a comma-delineated list, based on runs
        to my localhost EDG server. I am providing an abbreviated
        version of the RDF that the current SPARQL produces, below.

        |
        # baseURI: urn:x-evn-master:somecompany_organizations1_3
        # imports: http://topbraid.org/imported
        # imports: http://topbraid.org/skos.shapes
        <http://topbraid.org/skos.shapes>

        @prefix metadata: <http://topbraid.org/metadata#> .
        @prefix teamwork: <http://topbraid.org/teamwork#> .
        @prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#>> .
        @prefix owl:   <http://www.w3.org/2002/07/owl#
        <http://www.w3.org/2002/07/owl#>> .
        @prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#
        <http://www.w3.org/2000/01/rdf-schema#>> .
        
<https://schema.somecompany.com/ontologies/scorg#b363fc0a-2c2c-11b2-80af-001dd8b72b91
        
<https://schema.somecompany.com/ontologies/scorg#b363fc0a-2c2c-11b2-80af-001dd8b72b91>>
                <http://www.w3.org/2004/02/skos/core#prefLabel
        <http://www.w3.org/2004/02/skos/core#prefLabel>>
                        "A1" , "A2" , "A3";
               
        
<https://schema.somecompany.com/ontologies/somecompany_organization#org_id
        
<https://schema.somecompany.com/ontologies/somecompany_organization#org_id>>
                        "A1" , "A2" , "A3" .

        <urn:x-evn-master:somecompany_organizations1_3>
                a owl:Ontology ;
                rdfs:label  "somecompany_organizations1_2" ;
                metadata:status metadata:UnderDevelopmentStatus ;
                <http://topbraid.org/swa#defaultNamespace
        <http://topbraid.org/swa#defaultNamespace>>
                       
        "http://example.org/taxonomies/somecompany_organizations1_2#
        <http://example.org/taxonomies/somecompany_organizations1_2#>" ;
                teamwork:newInstancesUserCannotModifyURI
                        false ;
                owl:imports      <http://topbraid.org/skos.shapes
        <http://topbraid.org/skos.shapes>> ,
        <http://topbraid.org/imported> .
        |



        On Friday, January 17, 2020 at 10:14:04 AM UTC-5, Irene
        Polikoff wrote:

            There are 3 triples here: id, label and type

            |
            scorg:b363fc0a-2c2c-11b2-80af-001dd8b72b91
            
<https://schema.somecompany.com/ontologies/somecompany_organization#org_id
            
<https://schema.somecompany.com/ontologies/somecompany_organization#org_id>>
              "A1" ;
             rdf:type
             
<https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91
            
<https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91>>
            ;
               <http://www.w3.org/2004/02/skos/core#prefLabel
            <http://www.w3.org/2004/02/skos/core#prefLabel>>  "test
            org" .
            |

            They all look fine syntactically.

            What do you mean by ‘not well formed’?


            On Jan 17, 2020, at 9:55 AM, Michael Phelan
            <[email protected]> wrote:

            I am pasting the Taxonomy a second time, as there was a
            typo in one of the namespace references.

            |
            # baseURI: urn:x-evn-master:somecompany_organizations
            # imports: http://topbraid.org/skos.shapes
            <http://topbraid.org/skos.shapes>
            # imports: http://topbraid.org/teamworkconstraints
            <http://topbraid.org/teamworkconstraints>
            # imports: urn:x-evn-master:somecompany_organization

            @prefixmetadata:<http://topbraid.org/metadata#
            <http://topbraid.org/metadata#>> .
            @prefix scorg:
             
<https://schema.somecompany.com/taxonomies/somecompany_organizations#
            
<https://schema.somecompany.com/taxonomies/somecompany_organizations#>>
            .
            @prefix rdf:
             <http://www.w3.org/1999/02/22-rdf-syntax-ns#
            <http://www.w3.org/1999/02/22-rdf-syntax-ns#>> .
            @prefix owl:  <http://www.w3.org/2002/07/owl#
            <http://www.w3.org/2002/07/owl#>> .
            @prefix teamwork:  <http://topbraid.org/teamwork#
            <http://topbraid.org/teamwork#>> .
            @prefix rdfs:  <<a
            href="http://www.w3.org/2000/01/rdf-schema#
            <http://www.w3.org/2000/01/rdf-schema#>
            |

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/ec159f8c-f8f9-4280-b68a-c69c1515c5d3%40googlegroups.com <https://groups.google.com/d/msgid/topbraid-users/ec159f8c-f8f9-4280-b68a-c69c1515c5d3%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "TopBraid 
Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/6a2332f9-c466-b695-2efb-7179ad5664ed%40topquadrant.com.

Reply via email to