How can we push errors into an error field of sys_import_set_row table via transform map script.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2015 05:02 AM
How can we push errors into an error field of sys_import_set_row table via transform map script.
I have written few validations in a transform map script, which will ignore the row if condition doesn't matches.As there are many scenarios so I want to push the information in the error field of sys_import_set_row table that why row got ignored.
I didn't see any function in wiki that we can use to push error to error field of sys_import_set_row table via transform map script.
Does anyone have any solution?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2015 06:07 AM
Hi Aanchal,
I used the Comment field earlier to put the errors/comments that I generated. You just need to add following line in your onBefore script
source.sys_import_state_comment = "your_error_message";
Not sure about the way to use the Error field though, it being a reference.
Hope that helps,
Mandar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2015 04:46 AM
Thanks Mandar. This can be workaround but in this some default text i.e. "Row transform ignored by onBefore script" is getting appended with my error message.
I checked this is not a default value. Do you have any clue from where it is coming. I don't want this text.I just want error message which I have included in the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2015 05:42 AM
Transform script:
error = true;
error_message = "message";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2015 06:13 AM
I would imagine you would use the same syntax for the error field:
ie - source.sys_row_error = " your_error_message";