How to transfer data from staging table to multiple CI class tables?

Nilofer
Tera Contributor

I have a transform map as shown below

Nilofer_0-1704707395275.png

The data from the staging table has to be moved to various other tables in cmdb_ci. 

For example, if the field value of "resource type" in staging table is 'Linux' then the data should be moved to dedicated linux table.

How is this possible? Kindly assist me with it. 

2 ACCEPTED SOLUTIONS

piyushsain
Tera Guru
Tera Guru

Hi @Nilofer  

You can create multiple Transform maps to a single data source, in each Transform map you can script to ignore any row that is not needed for that target table  

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,
Piyush Sain

View solution in original post

for example if you are in Linux Transform Map:

if(source.resource_type == 'Windows')

ignore= 'true'

else if(source.resource_type == 'Linux')

write_your_logic

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,
Piyush Sain

View solution in original post

4 REPLIES 4

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Nilofer  

 

Give a try on below link

 

https://www.servicenow.com/community/now-platform-forum/transforming-data-on-the-cmdb-tables-and-set...

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

piyushsain
Tera Guru
Tera Guru

Hi @Nilofer  

You can create multiple Transform maps to a single data source, in each Transform map you can script to ignore any row that is not needed for that target table  

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,
Piyush Sain

Could you provide me a sample script for reference?

 

for example if you are in Linux Transform Map:

if(source.resource_type == 'Windows')

ignore= 'true'

else if(source.resource_type == 'Linux')

write_your_logic

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,
Piyush Sain