- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2018 07:46 AM
Hi,
We're upoading data to SNOW custom table through import set staging tables from excel file.
We wanted to make sure values are available for all mandatory fields in the excel file before data gets inserted into SNOW table. If a field value is missing in excel file, an error message should be shown to end-user and record shouldn't be inserted into our custom table.
How to implement this?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2018 04:05 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2018 08:28 AM
Hi Balaji,
The Enforce mandatory fields option on a Transform Map allows enforcement of mandatory fields.
Enforce Mandatory Fields will solve your issue.
Mark If Correct/Helpful if you found my answer correct.
Regards,
Ajay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2018 09:53 AM
Thanks Ajay for the response.
I tried using it but it didn't resolve the issue.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2018 09:10 PM
Hi Balaji,
Write a onBefore transform map script :
if('source.mandator_field_name1' == '' || 'source.mandator_field_name2' == '' && action == 'insert')
{
ignore = true;
gs.log("Mandatory fields empty : Record Insertion skipped");
}
Regards,
Ajay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2018 02:21 AM
Hi Ajay,
Thanks for the response, I tried this script like you suggested but it didn't work out,
if(u_st_account_master.u_sbu == '' && action == 'insert')
{
ignore = true;
gs.log("Mandatory fields empty : Record Insertion skipped");
}