Forum Discussion
Hi Manzoor ,
Depending on your input data, if you have a flat object, you can make all of the NULL fields blank by using the following expression:
$.mapValues(val => val == null ? "" : val)
This will iterate over each value for each key in the input data and depending if the value is null, it will return an empty string otherwise it will return the original value.
Input data sample:
[
{
"msg": "Hello, World",
"num": 1,
"field2": null
}
]
Output:
[
{
"msg": "Hello, World",
"num": 1,
"field2": ""
}
]
Thanks j_angelevski
- petar_rajchinos6 years agoNew Contributor III
Hi parvez.shaikh19,
If there is a unique key in the excel and the SQL server table the easiest way to detect changes is using Diff snap (https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438546/Diff). If that doesn’t help than you need to manually create logic for getting the rows from the excel and searching the row in the table. In order to make the search easier and faster you can hash each row (Digest.md5(col1+col2)) from the excel and do the same thing with the table rows and compare hashes instead of columns.
Regards,
Petar
Related Content
- 7 years ago
- 10 months ago