Transform script is not working as expected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 06:00 AM
Hi team,
We are making account state = Inactive and Active = False for the below mentioned External id(Target) values which is mapped with u_customer_account(Source) records using transform script.
CAN003206
AN_CUST2889
AN_CUST2794
Using the below transform script
if (source.u_customer_account_no == 'CAN003206' || source.u_customer_account_no == 'AN_CUST2794' || source.u_customer_account_no =='AN_CUST2889') {
target.u_account_state = 1; // Assigning 1 to u_account_state
target.u_active = false; // Assigning false to u_active
} else {
target.u_account_state = 0; // Assigning 0 to u_account_state
target.u_active = true; // Assigning true to u_active
}
In the image you can see all the records are showing same value.
Kindly Assist on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2024 12:28 AM
Hello @AshwiniR ,
1. Ensure that the source field u_customer_account_no and target fields u_account_state and u_active are correctly mapped in your transform map.
2. Verify that the field types are correct (e.g., u_account_state should be an integer and u_active should be a boolean).
3. Add logging to your script to see what values are being processed.
Thank you!!
Dnyaneshwaree Satpute
Tera Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2024 03:44 AM
Hi @AshwiniR
Check Field Names: Ensure the field names (u_customer_account_no, u_account_state, and u_active) are correct and match the names in your source and target tables.