How to make a Robust Transform Engine Glide Lookup Operation conditional?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2022 01:45 PM
I am building a robust transform ETL definition and have it almost working.
I have the glide operation working but I need it to only run if the source field is not empty.
I see the "Is Conditional" check box and see that when I check it there is a place to enter a script. What I can't find is any documentation about what I can do in that box. How do I access the field value? What should the script return?
- Labels:
-
Data Acquisition
-
Service Graph
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2022 01:07 PM
I did a work around by using a Script Operation and this script:
(function(batch, output) {
for (var i = 0; i < batch.length; i++) {
if(batch[i].input != ""){
var grUser = new GlideRecord("sys_user");
grUser.addQuery("name", batch[i].input);
grUser.query();
if(grUser.next()){
output[i] = grUser.sys_id;
}
}
}
})(batch, output);