Table: servicenow_sn_chg_rest_change_task - Query ServiceNow Change Tasks using SQL
ServiceNow Change Tasks are a part of the Change Management process in ServiceNow, where each task represents a set of actions required to implement a change in the IT infrastructure. These tasks are created as part of a Change Request and are assigned to various teams for implementation. They help in breaking down the change into manageable tasks and tracking the progress of each task separately.
Table Usage Guide
The servicenow_sn_chg_rest_change_task
table provides insights into Change Tasks within ServiceNow Change Management. As an IT Operations Manager, explore task-specific details through this table, including task status, assigned team, and associated metadata. Utilize it to track the progress of each change task, identify bottlenecks, and ensure timely completion of changes in the IT infrastructure.
Examples
What is the state_name distribution of change tasks in the servicenow_sn_chg_rest_change_task table?
Analyze the distribution of change tasks across various states in the Servicenow platform. This is useful to identify which states have the most change tasks, thereby providing insights into areas that may require more attention or resources.
select state_name, count(*) as countfrom servicenow_sn_chg_rest_change_taskgroup by state_nameorder by count desc;
select state_name, count(*) as countfrom servicenow_sn_chg_rest_change_taskgroup by state_nameorder by count desc;
How many change tasks have been created by each user in the servicenow_sn_chg_rest_change_task table?
Analyze the distribution of task creation in your system to understand the workload and productivity of each user. This could be useful for assessing individual contributions or identifying potential bottlenecks in your workflow.
select sys_created_by, count(*) as countfrom servicenow_sn_chg_rest_change_taskgroup by sys_created_by;
select sys_created_by, count(*) as countfrom servicenow_sn_chg_rest_change_taskgroup by sys_created_by;
How many change tasks have been assigned to each assignment group in the servicenow_sn_chg_rest_change_task table?
Analyze the distribution of assigned tasks among different groups in your service management system. This can help in understanding workload distribution and identifying any potential bottlenecks or uneven task allocation.
select assignment_group_name, count(*) as countfrom servicenow_sn_chg_rest_change_taskgroup by assignment_group_name;
select assignment_group_name, count(*) as countfrom servicenow_sn_chg_rest_change_taskgroup by assignment_group_name;
How many change tasks have been assigned to each user and what is their average priority?
Explore the distribution of task assignments and understand the average priority level assigned to each user. This can help in assessing workload and task importance in a team.
select assigned_to_name, count(*) as num_tasks_assigned, avg(priority) as avg_priorityfrom servicenow_sn_chg_rest_change_taskgroup by assigned_to_name;
select assigned_to_name, count(*) as num_tasks_assigned, avg(priority) as avg_priorityfrom servicenow_sn_chg_rest_change_taskgroup by assigned_to_name;
How many change tasks have been completed by each user in the last 30 days?
Discover the productivity of each user by counting the number of tasks they have completed in the last 30 days. This is beneficial in assessing individual performance and identifying high-performing team members.
select assigned_to_name, count(*) as num_tasks_completedfrom servicenow_sn_chg_rest_change_taskwhere state = 3 and sys_updated_on >= now() - interval '30 days'group by assigned_to_name;
select assigned_to_name, count(*) as num_tasks_completedfrom servicenow_sn_chg_rest_change_taskwhere state = 3 and sys_updated_on >= datetime('now', '-30 days')group by assigned_to_name;
Schema for servicenow_sn_chg_rest_change_task
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
active | boolean | Indicates whether the change task is active. | |
activity_due | text | Due date for the activity associated with the change task. | |
additional_assignee_list | text | Additional users assigned to the change task. | |
approval | text | Approval associated with the change task. | |
approval_history | text | Approval history of the change task. | |
approval_set | text | Approval set associated with the change task. | |
assigned_to | text | User assigned to the change task. | |
assigned_to_name | text | Name of the user assigned to the change task. | |
assignment_group | text | Assignment group for the change task. | |
assignment_group_name | text | Name of the assignment group for the change task. | |
business_duration | text | Business duration of the change task. | |
business_service | text | Business service associated with the change task. | |
calendar_duration | text | Calendar duration of the change task. | |
change_request | text | Change request associated with the change task. | |
change_request_number | text | Number of the change request associated with the change task. | |
change_task_type | text | Type of the change task. | |
close_code | text | Code indicating the reason for closing the change task. | |
close_notes | text | Notes indicating the details of the closure of the change task. | |
closed_at | timestamp with time zone | Date and time when the change task was closed. | |
closed_by | text | User who closed the change task. | |
cmdb_ci | text | Configuration item associated with the change task. | |
cmdb_ci_name | text | Name of the configuration item associated with the change task. | |
comments | text | Comments added to the change task. | |
comments_and_work_notes | text | Comments and work notes added to the change task. | |
company | text | Company associated with the change task. | |
contact_type | text | Type of contact associated with the change task. | |
contract | text | Contract associated with the change task. | |
correlation_display | text | Display value of the correlation ID for the change task. | |
correlation_id | text | Correlation ID for the change task. | |
created_from | text | Source from which the change task was created. | |
delivery_plan | text | Delivery plan associated with the change task. | |
delivery_task | text | Delivery task associated with the change task. | |
description | text | Description of the change task. | |
due_date | timestamp with time zone | Due date for the change task. | |
escalation | bigint | Escalation associated with the change task. | |
escalation_name | text | Name of the escalation associated with the change task. | |
expected_start | text | Expected start date for the change task. | |
follow_up | text | Follow-up details for the change task. | |
group_list | text | List of groups associated with the change task. | |
impact | bigint | Impact of the change task. | |
instance_url | text | The ServiceNow instance URL. | |
knowledge | boolean | Indicates whether the change task is based on knowledge. | |
location | text | Location associated with the change task. | |
made_sla | boolean | Indicates whether the change task met the service level agreement (SLA). | |
number | text | Number of the change task. | |
on_hold | boolean | Indicates whether the change task is on hold. | |
on_hold_reason | text | Reason for placing the change task on hold. | |
opened_at | timestamp with time zone | Date and time when the change task was opened. | |
opened_by | text | User who opened the change task. | |
order | text | Order value of the change task. | |
parent | text | Parent change task of the current change task. | |
planned_end_date | timestamp with time zone | Planned end date for the change task. | |
planned_start_date | timestamp with time zone | Planned start date for the change task. | |
priority | bigint | Priority of the change task. | |
reassignment_count | bigint | Number of times the change task was reassigned. | |
rejection_goto | text | Destination for rejection in the change task workflow. | |
route_reason | text | Reason for routing the change task. | |
service_offering | text | Service offering associated with the change task. | |
short_description | text | Short description of the change task. | |
skills | text | Skills associated with the change task. | |
sla_due | text | Due date for the service level agreement (SLA) associated with the change task. | |
sn_esign_document | text | Electronic signature document associated with the change task. | |
sn_esign_esignature_configuration | text | Electronic signature configuration associated with the change task. | |
sp_connection_name | text | Steampipe connection name. | |
sp_ctx | jsonb | Steampipe context in JSON form. | |
state | bigint | State of the change task. | |
state_name | text | Name of the state of the change task. | |
sys_class_name | text | Class name of the change task record. | |
sys_created_by | text | User who created the change task. | |
sys_created_on | timestamp with time zone | Date and time when the change task was created. | |
sys_domain | text | Domain associated with the change task. | |
sys_domain_path | text | Path of the domain associated with the change task. | |
sys_id | text | Unique system identifier for the change task. | |
sys_mod_count | bigint | Number of times the change task was modified. | |
sys_tags | text | Tags associated with the change task. | |
sys_updated_by | text | User who last updated the change task. | |
sys_updated_on | timestamp with time zone | Date and time when the change task was last updated. | |
task_effective_number | text | Effective number of the change task. | |
time_worked | text | Amount of time worked on the change task. | |
universal_request | text | Universal request associated with the change task. | |
upon_approval | text | Actions to be performed upon approval of the change task. | |
upon_reject | text | Actions to be performed upon rejection of the change task. | |
urgency | bigint | Urgency of the change task. | |
user_input | text | User input associated with the change task. | |
variables | text | Variables associated with the change task. | |
watch_list | text | Users on the watch list for the change task. | |
wf_activity | text | Workflow activity associated with the change task. | |
work_end | timestamp with time zone | End time of the work performed for the change task. | |
work_notes | text | Work notes added to the change task. | |
work_notes_list | text | Work notes associated with the change task. | |
work_start | text | Start time of the work performed for the change task. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- servicenow
You can pass the configuration to the command with the --config
argument:
steampipe_export_servicenow --config '<your_config>' servicenow_sn_chg_rest_change_task