Details

      Description

      The service below fails, it seems to be to do with the data massage in the BIND command just above.
      We are using SPARQL-END-POINT being a d2r server.

      base <http://localhost:8000/>
      prefix owl: <http://www.w3.org/2002/07/owl#>
      prefix based: <http://localhost:8000/bdm/api/appindividual/based:>
      prefix xsd: <http://www.w3.org/2001/XMLSchema#>
      prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
      prefix rep: <http://localhost:8000/bdm/api/kbobject/rep:>
      prefix dc: <http://purl.org/dc/elements/1.1/>
      prefix sys: <http://localhost:8000/bdm/api/kbobject/sys:>
      prefix base: <http://localhost:8000/bdm/api/kbobject/base:>
      prefix s: <http://localhost:8000/bdm/api/>
      prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      prefix bds: <http://www.bigdata.com/rdf/search#>
      prefix sysd: <http://localhost:8000/bdm/api/appindividual/sysd:>
      prefix repd: <http://localhost:8000/bdm/api/appindividual/repd:>
      prefix skos: <http://www.w3.org/2004/02/skos/core#>
      prefix syapse: <http://localhost:8000/graph/syapse#>
      PREFIX vocab: <http://test-ted.syapse.com:2020/resource/vocab/>
      SELECT *
      FROM <http://localhost:8000/graph/vocabulary>
      FROM <http://localhost:8000/graph/syapse>
      FROM <http://localhost:8000/graph/django/diagnosticsInc>
      FROM <http://localhost:8000/graph/ontology/base>
      FROM <http://localhost:8000/graph/ontology/rep>
      FROM <http://localhost:8000/graph/diagnosticsInc/abox>
      FROM <http://localhost:8000/graph/diagnosticsInc/vocabulary>
      FROM <http://localhost:8000/graph/ontology/sys>
      FROM NAMED <http://localhost:8000/graph/vocabulary>
      FROM NAMED <http://localhost:8000/graph/syapse>
      FROM NAMED <http://localhost:8000/graph/django/diagnosticsInc>
      FROM NAMED <http://localhost:8000/graph/ontology/base>
      FROM NAMED <http://localhost:8000/graph/ontology/rep>
      FROM NAMED <http://localhost:8000/graph/diagnosticsInc/abox>
      FROM NAMED <http://localhost:8000/graph/diagnosticsInc/vocabulary>
      FROM NAMED <http://localhost:8000/graph/ontology/sys>
      
      WITH {
      SELECT DISTINCT $j__1 ?PatientOmicsRecord_A $dbsnpId $dbsnpIdInt $varstring
      FROM <http://localhost:8000/graph/vocabulary>
      FROM <http://localhost:8000/graph/syapse>
      FROM <http://localhost:8000/graph/django/diagnosticsInc>
      FROM <http://localhost:8000/graph/ontology/base>
      FROM <http://localhost:8000/graph/ontology/rep>
      FROM <http://localhost:8000/graph/diagnosticsInc/abox>
      FROM <http://localhost:8000/graph/diagnosticsInc/vocabulary>
      FROM <http://localhost:8000/graph/ontology/sys>
      FROM NAMED <http://localhost:8000/graph/vocabulary>
      FROM NAMED <http://localhost:8000/graph/syapse>
      FROM NAMED <http://localhost:8000/graph/django/diagnosticsInc>
      FROM NAMED <http://localhost:8000/graph/ontology/base>
      FROM NAMED <http://localhost:8000/graph/ontology/rep>
      FROM NAMED <http://localhost:8000/graph/diagnosticsInc/abox>
      FROM NAMED <http://localhost:8000/graph/diagnosticsInc/vocabulary>
      FROM NAMED <http://localhost:8000/graph/ontology/sys>
      
      WHERE {
      
       OPTIONAL {
         ?PatientOmicsRecord_A sys:name $j__1
       }
       INCLUDE %__MainQuery
      }} AS %__FullQuery
      WITH {
      SELECT *
      FROM <http://localhost:8000/graph/vocabulary>
      FROM <http://localhost:8000/graph/syapse>
      FROM <http://localhost:8000/graph/django/diagnosticsInc>
      FROM <http://localhost:8000/graph/ontology/base>
      FROM <http://localhost:8000/graph/ontology/rep>
      FROM <http://localhost:8000/graph/diagnosticsInc/abox>
      FROM <http://localhost:8000/graph/diagnosticsInc/vocabulary>
      FROM <http://localhost:8000/graph/ontology/sys>
      FROM NAMED <http://localhost:8000/graph/vocabulary>
      FROM NAMED <http://localhost:8000/graph/syapse>
      FROM NAMED <http://localhost:8000/graph/django/diagnosticsInc>
      FROM NAMED <http://localhost:8000/graph/ontology/base>
      FROM NAMED <http://localhost:8000/graph/ontology/rep>
      FROM NAMED <http://localhost:8000/graph/diagnosticsInc/abox>
      FROM NAMED <http://localhost:8000/graph/diagnosticsInc/vocabulary>
      FROM NAMED <http://localhost:8000/graph/ontology/sys>
      
      WHERE {
      BIND (<http://localhost:8000/bdm/api/syuser/12> as ?user)
      
      
       { SELECT DISTINCT ?PatientOmicsRecord_A ?user
         {
           { ?PatientOmicsRecord_A sys:owner ?user }
           UNION
           { ?PatientOmicsRecord_A sys:assignedProject ?project .
             ?project syapse:isPrivate false .
           }
           UNION
           { ?PatientOmicsRecord_A sys:assignedProject ?project .
             ?project syapse:member ?user .
           }
         }
       }
      
       ?PatientOmicsRecord_A rdf:type / rdfs:subClassOf * rep:PatientVariantRecord .
       ?PatientOmicsRecord_A rep:hasVariantRecordAlteration/rep:dbSnpId/skos:prefLabel $dbsnpId .
             BIND (  SUBSTR($dbsnpId, 3)  as $dbsnpIdInt )
      	SERVICE <http://SPARQL-END-POINT/sparql> {
       		?s vocab:snp_snp_id $dbsnpIdInt;
      		   vocab:snp_univar_id ?u .
      		?xx vocab:univariation_univar_id ?u;
      		    vocab:univariation_var_str $varstring
      	}
      }} AS %__MainQuery
      
      WHERE {
      
      { SELECT (COUNT(*) AS $S__COUNT)
       WHERE {
         INCLUDE %__FullQuery
       }
      }
      INCLUDE %__FullQuery
      
      }
      ORDER BY DESC(?j__1) DESC(?j__1) ?PatientOmicsRecord_A
      LIMIT 20
      

      the d2rserver reports ...

      Note the BINDINGS looks wrong

      INFO  SPARQL               :: Query:  
        prefix owl: <http://www.w3.org/2002/07/owl#>  
        prefix based: <http://localhost:8000/bdm/api/appindividual/based:>  
        prefix xsd: <http://www.w3.org/2001/XMLSchema#>  
        prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>  
        prefix rep: <http://localhost:8000/bdm/api/kbobject/rep:>  
        prefix dc: <http://purl.org/dc/elements/1.1/>  
        prefix sys: <http://localhost:8000/bdm/api/kbobject/sys:>  
        prefix base: <http://localhost:8000/bdm/api/kbobject/base:>  
        prefix s: <http://localhost:8000/bdm/api/>  
        prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
        prefix bds: <http://www.bigdata.com/rdf/search#>  
        prefix sysd: <http://localhost:8000/bdm/api/appindividual/sysd:>  
        prefix repd: <http://localhost:8000/bdm/api/appindividual/repd:> 
        prefix skos: <http://www.w3.org/2004/02/skos/core#> 
        prefix syapse: <http://localhost:8000/graph/syapse#> 
        prefix vocab: <http://test-ted.syapse.com:2020/resource/vocab/> 
        SELECT  ?s ?dbsnpIdInt ?u ?xx ?varstring WHERE {     		
           ?s vocab:snp_snp_id $dbsnpIdInt;  		  
               vocab:snp_univar_id ?u .  		
           ?xx vocab:univariation_univar_id ?u;  		    
              vocab:univariation_var_str $varstring  	 } 
      BINDINGS { ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) }
      
      
      00:58:40 DEBUG QueryEngineD2RQ      :: Before translation:
      (project (?s ?dbsnpIdInt ?u ?xx ?varstring)
       (join
         (bgp
           (triple ?s <http://test-ted.syapse.com:2020/resource/vocab/snp_snp_id> ?dbsnpIdInt)
           (triple ?s <http://test-ted.syapse.com:2020/resource/vocab/snp_univar_id> ?u)
           (triple ?xx <http://test-ted.syapse.com:2020/resource/vocab/univariation_univar_id> ?u)
           (triple ?xx <http://test-ted.syapse.com:2020/resource/vocab/univariation_var_str> ?varstring)
         )
         (table
           (row)
           (row)
           (row)
           (row)
           (row)
           (row)
           (row)
           (row)
           (row)
           (row)
           (row)
           (row)
           (row)
           (row)
           (row)
           (row)
           (row)
           (row)
           (row)
           (row)
           (row)
         )))
      
      
      

      This is blocking a colleague so I am marking it as critical and will work on it with some urgency

      ----

      See BLZG-745 (Slow BIND) which is probably the root cause for this ticket.

        Attachments

          Activity

            People

            Assignee:
            michaelschmidt michaelschmidt
            Reporter:
            jeremycarroll jeremycarroll
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: