Overview
In this example, your company uses JIRA heavily. You have multiple projects and they are divided in two categories:
Internal
Where you track issues internallyService Desks
Where people outside of the company report issues
All issues across all projects are synced in one data source jira_issues
. You want to have different insights for internal projects and service desk projects.
Approach 1: Filter the issues from the insight
You can filter the tasks from within each insight. You can use the following SQL queries:
For internal projects:
SELECT * FROM jira_issues WHERE projectname like '%Internal%'
For service desk projects:
SELECT * FROM jira_issues WHERE projectname like '%Service Desk%'
You have to repeat this operation across all insights that separate the two types of issues. If you change the naming convention of the projects, you have to go over all of them again.
Approach 2: Filter the issues with virtual data sources
By creating a virtual data source for each types of projects, you can control the changes from a single place.
Perform the following:
Create a virtual data source for the internal projects.
Define its key asinternal_jira_issues
.
For more information, see Create virtual data sources.In the SQL editor, enter the following:
βSELECT * FROM jira_issues WHERE projectname like '%Internal%'
Create another virtual data source for the service desk projects.
Define its key asservice_desk_jira_issues
.
In the SQL editor, enter the following:
βSELECT * FROM jira_issues WHERE projectname like '%Service Desk%'
In the SQL of the insights, depending on the type of issues that you want to handle, use one of the following:
βSELECT * FROM internal_jira_issues
or
βSELECT * FROM service_desk_jira_issues
For more information, see Create insights with SQL.
Example
The following diagram demonstrates the process: