Forum Discussion
Hi j_angelevski
Source System: Workday Prism
Target System: SAP Concur
Pulling Data from WDPrism via web service and pushing in to SAP Concur. While pulling data I'm getting few fields "Status", "Header', "Entity", "_debug".
In " entity " I have the reqiured data. In Which there are 137 fields that I need to Map and transform in to excel table.
Mapping and transformation in to excel is done. But columns having NULL value should be replaced by Blank value.
Can u help me out this. Bcz among 137 fields or say as excel columns I have almost 70+ NULL values in the in each record.
Thanks
Manzoor.
Hi Manzoor ,
You can use the following expression to replace the NULL values with blank in the entity object, assuming it is a flat object.
$entity.mapValues(val => val == null ? "" : val)
This will simply iterate over each value in the entity object, and check if the value is null, if it is, it will return an empty string otherwise it will return the original value.
- RogerSramkoski3 years agoEmployee
Hi @RavNeu, are you able to provide a screenshot of your pipeline? Just from the description alone it sounds like you want a JSON Formatter Snap before the Mapper to split on the rows array so each row becomes it’s own document. For example, if you have some data like this:
You could use a JSON Splitter to split on ‘jsonPath($, “response.entity.document.rows[*]”)’:
Then your Mapper could be configured like this:
Here is the short pipeline I built to demonstrate this in case it helps you to import it and visualize it:
QuickJSONArraySplitExample_2023_05_16.slp (5.5 KB)