Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

SPARQL query - DNG project Names

 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>

0 votes

Comments

 Can you please let me know what should you want exactly




One answer

Permanent link
Hello
We don't store project names in our DNG index so project names cannot be retrieved with a SPARQL query.

0 votes

Comments

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

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)?

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 log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 7,513
× 25

Question asked: Jun 18 '18, 12:57 p.m.

Question was seen: 3,794 times

Last updated: Aug 08 '18, 6:44 p.m.

Confirmation Cancel Confirm