Sample queries gather a broad range of artifacts, from
all artifacts to only one kind, such as change management or requirements
management. You can also run artifact elements queries.
Before you begin
Sample queries are available in the Queries page. Click the
Shared Queries tab and then open the Sample
folder. To run an artifact elements query, click the Artifact Elements
Queries tab and then open any of the default folders.
If you do not
see the Sample or artifact elements folders
in the appropriate tab, talk to your administrator about deploying
the content packages. If you are responsible for deploying the content
package, see Deploying a content package.
About this task
If you require custom queries, consider these points.
- If your team is not conversant in the SPARQL query language, contact
your IBM® service representative
to create custom queries for your team.
- If your team knows some SPARQL query language, look at the queries
that are the closest fit to what your team wants to accomplish, then
copy the query, rename it, and edit the query. Be sure to test the
query before you add it to a view to ensure that the query results
match your expectations.
- If your team has a strong foundation in the SPARQL query language,
they can start creating queries. Again, be sure to test the query
before you add it to a view to ensure that the query results match
your expectations.
Procedure
- In the main menu, click Queries and
then select or .
- To view the sample queries available for your use, open the Sample
folder in the Shared Queries screen or any of the default folders in the
Artifact Elements screen.
For a description of each query, see Predefined queries overview.
- Run a query by clicking the one that best fits your needs.
- Some queries have parameters that you must supply before
the query is run. Enter the values in the Assign Values
to Query Parameters dialog box.
After entering the parameter values, you can run the query, or you can click Save
as to save a copy of the query with your parameter. (The Save
as button is not available for artifact elements queries.) Give the newly copied
query a descriptive name and save it to your private folder (My
Queries). You can run the new query without being prompted for values.
Note: You can modify artifact
elements queries if you have administrator privileges.
- After you run a query, if you do not receive the query
results that you expected, talk to your team's query author.
To
troubleshoot the query, authors can start by viewing the SPARQL query
that was run by the index. They can run the query and then click the Show
the SPARQL query used to produce the query results icon
in the upper right to troubleshoot.
If you use one or more parameters
in your query, read about a known issue.
- The Query Result page shows the artifacts
that are retrieved by the query. Act on the artifacts in the Query
Result page.
- Open Artifact starts the native tool that
the artifact was created in and displays the artifact in the tool.
You can then modify the artifact and save it.
- Show Properties displays the properties
of the artifact in a results window.
- Start Analysis loads the default impact
analysis profile. Click Run to start the analysis.
- Open View starts a view selector where you can choose a view to
visualize the query results.
Download the query as a .csv spreadsheet
by clicking the Download as Spreadsheet icon
in the upper right.