How to set the condition in transform map script before inserting the data in target table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2025 05:17 AM
How can we set condition in transform map, to cross check the user is present in the User table before inserting the data in the target table.
I have three tables named u_depatment_table (Source table) and u_employee_table(Target table) and sys_user table in these tables one field is common, called User field(Reference to sys_user table) whenever records are coming from source table First it hast to cross check that user is present in the User table or Not -> if it preset Then it has to insert the records in the target table respectively.
I have added few fields in the field mappings and set the User field to Coalesce
And please suggest me , shall I use the Transform Run script or the On before script.
I have written this code, but it is not working out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2025 05:42 AM
Use an onBefore script so it runs before the transform starts.
What are you doing with your 'initialize'/'insert'. You are creating an empty record this way.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2025 06:12 AM
Here With the help of User field in Source table, we have to check that user is present or not in the Sys_user table .
If it present then it has to create the records in the target table.
I have added few fields in the field mappings and set the User field to Coalesce
If I got the user who is present in sys_user table then what is the next step to do..then...(I got stuck here...)