We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Discovery Pattern pulls JSON having 15 records, but only creates 5

NagyDan1
Giga Guru

Please help with Discovery Pattern logic.

 

We are pulling data from Nutanix (via API link), and I get a JSON, I do see that when I click the "Run Operation" button on the Pattern step, the JSON is coming nicely with 15 records, I can see that clearly. Here comes the issue:

 

But then I have a Transform Table" operation step, which only processes 5 records out of the 15. 😲

 

Why? 😥

 

JSON contains 15 records, but then Transform Table only processes 5. What is wrong? 😥

1 ACCEPTED SOLUTION

NagyDan1
Giga Guru

Okay, so somebody reads this in the future: i found what the issue was.

 

The JSON coming from the API was having different types of Records. And if for one of the types the field that I "painted" is not coming then it will not create a record for it.

What fixed it was to have a second step to Parse the JSON.

Then following up with a Table Transform Step.


This way it has worked nicely. Thank me :)))

View solution in original post

4 REPLIES 4

Tanushree Maiti
Tera Patron

Hi @NagyDan1 

 

A Transform Table step can fail or halt if it expects a specific column or variable mapping.

Validate your transform map and check if it is throwing any error (check transform history/log). If yes, share the error screen shot.

 

Refer:

https://www.servicenow.com/community/ham-forum/transform-map-not-working-as-some-data-in-staging-tab...

 

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

This is not about Transform Map, why do you link something about Transform Map?

pr8172510
Kilo Sage

Hi @NagyDan1,

If the Run Operation step returns all 15 records but the Transform Table step processes only 5, the issue is typically in the Transform Table configuration rather than the API response.

 check

  • The JSONPath points to the complete JSON array.

  • Any filter or condition configured on the Transform Table.

  • Whether records are being matched/updated instead of created.

  • Required field mappings for all 15 records.

  • Pattern Debug output to identify skipped or failed records.

 the Pattern Debug output is the best place to determine why records are not being processed by the Transform Table step.

 

NagyDan1
Giga Guru

Okay, so somebody reads this in the future: i found what the issue was.

 

The JSON coming from the API was having different types of Records. And if for one of the types the field that I "painted" is not coming then it will not create a record for it.

What fixed it was to have a second step to Parse the JSON.

Then following up with a Table Transform Step.


This way it has worked nicely. Thank me :)))