It's all about the answers!

Ask a question

SPARQL query - DNG project Names


Greg Leff (1125) | asked Jun 18 '18, 12:57 p.m.

 Hello forum, I'm trying to determine how I might list the DNG Project Names (not just a URL) in the SPARQL Query below in addition to all of the other columns. I've tried to find the answer by reviewing many of the SPARQL references and I can't seem to make sense of it. 


If you're also able to show me where I can find the reference documentation that describes the answer I would also appreciate it. 

Main article Link

SPARQL Query
PREFIX dc: <http://purl.org/dc/terms/> 
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
PREFIX rm: <http://www.ibm.com/xmlns/rdm/rdf/> 
PREFIX rmTypes: <http://www.ibm.com/xmlns/rdm/types/> 
PREFIX rrmReview: <http://www.ibm.com/xmlns/rrm/reviews/1.0/> 
PREFIX nav: <http://com.ibm.rdm/navigation#> 
PREFIX jfs: <http://jazz.net/xmlns/foundation/1.0/> 
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT DISTINCT ?context ( count(?artifact) as ?artifactCount ) ( count(?binding) as ?bindingCount ) ( count (?link) as ?linkCount )
WHERE {
{?artifact rdf:type rm:Artifact .
OPTIONAL{?artifact rm:boundArtifact ?boundArt .}
FILTER (!BOUND(?boundArt)) .
?artifact jfs:resourceContext ?context
}
UNION
{?binding rdf:type rm:Artifact .
?binding rm:boundArtifact ?boundArt .
?binding jfs:resourceContext ?context
}
UNION {
?link rdf:type rm:Link .
?link jfs:resourceContext ?context
}
}
GROUP BY ?context
ORDER BY DESC (?artifactCount )

</pre>

Comments
Rohini Kumar commented Jun 19 '18, 1:40 a.m.

 Can you please let me know what should you want exactly


One answer



permanent link
Rosa Naranjo (2.9k11723) | answered Jun 19 '18, 10:29 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hello
We don't store project names in our DNG index so project names cannot be retrieved with a SPARQL query.

Comments
Greg Leff commented Jun 19 '18, 11:59 a.m.

Thanks Rosa - is there any other way to get the same kind of data? Maybe through a JRS query? 


Rosa Naranjo commented Jun 19 '18, 12:04 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
During our internal discussion on this, someone mentioned that perhaps this was possible via LQE SPARQL query. But it was not elaborated on so I have no details on that.

In JRS, I am sure you can get project names for DNG projects.  Are you saying you would like to build a JRS report that similarly provides artifact counts by project (name)?

Petru Acsinte commented Aug 08 '18, 6:44 p.m.
JAZZ DEVELOPER

There are a few things to consider:
- when you query DNG, you also pick up artifacts from archived projects, as well as artifacts that might no longer be part of any active configuration (they were deleted)
- JRS only stores versions coming from active configurations (there might be the odd case where an archived configuration left resources behind in JRS, but it is not the norm); JRS does not include any baseline data from projects without configuration mgmt enabled; therefore, querying JRS might not yield the results you are looking for if you are trying to obtain DNG metrics
- best bet to obtain the project name is a GET on the project URL (and you can use the response to also filter out archived projects)

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.