Skip to content

Commit 84cc4dd

Browse files
authored
Uploaded Readme file
Added ReadMe file to the folder
1 parent 80252a8 commit 84cc4dd

File tree

1 file changed

+18
-0
lines changed
  • Server-Side Components/Scheduled Jobs/Scheduled Data Import for Groups Population(Support and Managed By) for CMDB Classes

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
This is a Post-Import Script designed for a Scheduled Import . Its purpose is to cleanly map and update the Support Group and Managed By Group fields on Configuration Items (CIs) after data has been loaded into the staging table.
2+
3+
Script Functionality
4+
The script iterates through the records of an Import Set and performs the following core steps for each row:
5+
6+
i)Extract Data: Reads the CI Class Display Name (u_class), Support Group Name (u_support_group), and Managed By Group Name (u_managed_by_group) from the staging table record.
7+
8+
ii)Validate Class: Uses the u_class(name from staging table) value to look up and confirm the correct target CMDB table name (e.g., finding cmdb_ci_server from the display name "Server").
9+
10+
iii)Resolve Groups: Finds the system-unique sys_ids for both the Support Group and Managed By Group names.
11+
12+
iv)Update CIs: Queries the determined CMDB table, filters the CIs based on the Optional-Filters placeholder, and sets the support_group and managed_by_group fields using the resolved sys_ids.
13+
14+
**Points to note :
15+
1) The schedule-import should be linked to a Data Source which has the spreadsheet attached(where groups and classes info is present)
16+
2) This script populates the groups based on Group Name given in the spreadsheet(Make sure they are present in the instance and are following the appropriate naming convention)
17+
3) The script provided is a post script ,which executes after the data is imported.**
18+

0 commit comments

Comments
 (0)