Script to write to new import set and then kickoff transform map to process records

tpoeckes
Giga Guru

Hello All,

I have a CMDB import set called u_cmdb_import.  I also have a transform map called cmdb_process that will process the records and insert/update into CMDB.  The import set and transform map are defined as a data source.  I would also like to process two (2) more tables of data that are brought in via import set and then written to custom table 1) cmdb_data_1 2) cmdb_data_2.  I would like to use the same import set and transformation map.  Is there a way that I use a script to LOAD to a new import set, kick off the transform map to process the records.  The two (2) new tables would use the same fields in the import set.  Any help would be greatly appreciated.

7 REPLIES 7

Michael Ritchie
ServiceNow Employee
ServiceNow Employee

You can define multiple transform maps per import set data source.  Each transform map is tied to its own table and an order can be set on the transform maps so they process in a certain order.  What happens is the first one will run based on the transform map and then it will reprocess the records a second time with the next transform map and so on.  Believe this will meet your requirement without scripting.

Thanks for your reply.  Is there a way that I can write to the import set table loading data from the custom tables 1) cmdb_data_1 2) cmdb_data_2.  These tables will be read in using cmdb_data_1 as primary and then looking update record in cmdb_data_2 to get rest of info via script and then I want to write to the import set and transform.

I thought it would be easier to bring the two (2) data sources (external databases) cmdb_data_1 and cmdb_data_2 into ServiceNow as raw data and then creating a new custom table for each source.  These are two (2) different sources and would be very difficult to bring using the JDBC connection with specific JCL statements using Joins, etc... This is in addition to the regular CMDB import but it uses the same fields.

I am sorry to admit, I am not really understanding your reply.  Typically external data is written to an import set table first in raw format and then it is transformed into the target tables via transform maps.  The data can be inserted in the import set table via web services, JDBC, etc.

Is there way to write to an existing import set via script incrementing the ISET number and put it in load state and then run transform map?