Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Transform map automatically triggering

klavan32
Tera Contributor

Hi Team, 

 

I have created scripted rest API where we reads the json body from request and map the data into one of the staging tables that mapped to transform map.

 

As soon as the API is hit, the data is loaded into staging table then automatically inserting into target table triggering transform map.

 

Can someone please help how to identify why it is happening and how to avoid triggering transform map automatically

4 REPLIES 4

Tejas Adhalrao
Kilo Sage

hi @klavan32  ,

Yes, this behavior is expected if the staging table is configured to automatically run the Transform Map after the Import Set is created.

If you don't want the staging records to be inserted into the target table through the Transform Map, you have two options:

  • If the Transform Map should not run at all, make the Transform Map inactive.
  • If the Transform Map needs to remain active but you want to ignore all records, use an Transform Script and set -  ignore = true;

 

This will keep the data in the staging table but prevent the records from being inserted into the target table through that Transform Map.

 

If this helps, please mark it as Helpful and accept the solution.
Regards,
Tejas

Thank you @Tejas Adhalrao 

 

I understand your solution, but can you help me if i need to use onStart transform script or onBefore, but if i have to use them , wouldnt it impact when we manually transform the data using map?

Ankur Bawiskar
Tera Patron

@klavan32 

this is OOTB platform behavior.

As soon as record is inserted into staging table the system triggers transform map if any associated with that import set table

what's your actual requirement?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Tanushree Maiti
Tera Patron

Hi @klavan32 

 

Based on your description, the data transformation from the staging table to the target table is working perfectly according to your current configuration.

 

To help us assist you further, could you share what your expectations are or if there is a specific behavior you are looking to achieve?

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti