on before Robust transform script for ignore some record where (field) Caption doesn't contain " Server".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2022 06:54 AM
Hi Community ,
we are using Robust transform map to populate the target table but we have to transform those record's only where the staging table field (Caption) contain "Server".
and we are using OOTB Robust transform map integration , Robust transform map is new to me can someone help me on this , where should i have to script this out to achieve .
can you please help me with the code also .
Thanks in advance !!!
- Labels:
-
Operational Intelligence
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2022 07:16 AM
Hello amar,
You can write onBefore transform script on your transform map with below code to ignore the record with does not contain Server in Caption field:
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
var caption = source.u_caption; // check your Caption field name and replace accordingly
var lowerCaseCaption = caption.toLowerCase();
if (lowerCaseCaption.indexOf("server") == -1) {
ignore = true; // Record will be ignore and not created if the Caption field does not contain Server
} else {
//write your code
}
})(source, map, log, target);
Please mark my respsone as helpful/correct, if it answer your question.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2022 07:52 AM
Hi Mahendra ,
Thanks for the response
we are looking for Robust transform map on before script
the code you provided will work on normal transform map and not in Robust one .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2022 09:14 AM
Robust transform map provides a condition script you can use that. You can decide whether to prevent data from reaching staging itself or from staging to target accordingly in that corresponding RTE entity mapping you can implement the condition.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2022 11:18 PM