Building SQL queries to analyze services data
Scenario
Susan is a Service Desk manager in an IT organization. She is responsible for managing and tracking changes to the IT infrastructure to keep the service disruption to a minimum. She wants to know how many change requests are generated for each business service. She also wants to filter business services according to critical change requests. By using BMC Helix Dashboards, Susan can build a query to get this information.
Benefits
The visual query builder saves your query creation time. Additionally, users with no prior knowledge of SQL can create queries by using the visual query builder.
Workflow
Susan performs the following tasks:
Task 1: Create and configure a dashboard
- In BMC Helix Dashboards, select Add > Visualization.
- In the Data source list, make sure that BMC Helix is selected.
- From the Query type list, select Service Management.
- From the Type list, select Visual query builder.
- On the Visual query builder page, perform these steps:
- From the View list, select Change Management.
- Expand Change Details and drag the Business Service and Number of Changes fields to the Fields area.
- Click Preview.
- Click Use query.
- Click Use query.
- Configure the visualization settings.
For details, see Configuring-dashboards-panels-and-queries. - Save the dashboard.
Susan gets the total count of change requests for each business service. Now, she wants to filter the change requests according to their priority. Susan creates a variable to be used to filter change requests according to their priority. So, she creates the variable:
Task 2: Create a variable to be used as a filter
- Open the dashboard that is saved.
- In the Dashboard settings section, select Variables > Add variable.
- On the variable page, perform these steps:
- In the General section, provide a name, label, and optional description for the variable.
- In the Data source list, make sure that BMC Helix is selected.
- Enable the query editor.
- Click Query Builder.
- From the View list, select Change Management.
- Expand Change Details, and drag the Priority field to the Fields area.
- Click Preview and then click Use query.
- Under Selection options, specify whether you want to enable multiple value and all options selection.
- Click Apply.
The variable is created.
- Save the dashboard.
Susan now updates the dashboard query to use the variable that she created.
Task 3: Update the dashboard query to use the variable and view the results
- Open the dashboard.
- Edit the panel.
- Click Query builder.
- Expand Change Details and drag the Priority field to the Filters area.
- Configure the filter value.
- Click Preview.
- Click Use query.
- Save the changes.
Susan can now filter change requests according to priority.
Results
Susan gets information about the business services with critical status and can inform the stakeholders to resolve the change requests on priority.