Hi All,
I have a use case where I am importing some data into custom table and in that table I am creating a attribute name as CompanyType as string enum using userEnum="" .I have fixed values to be entered into this column lets say A,B and C
Now I want when user upload a csv file and when map column with this enum column all rows where it's not matching with pre fixed enums value in our database should get rejected.
So if in csv file I have one row where companyType is D it should get rejected and also if this have small a then also it should get rejected. Only allowed values are A,B and C.
Can someone please help me out how to resolve this ? As i have created userEnum as closed type still it's not working and user able to enter any values via CSV into this table.
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @AC_Dev
You can achieve the fixed list at the Load Activity level.
Edit the format
Select the field you want to format and click on the Detail magnifying icon
In the Details, use the Remapping section to fill in the expected values from the value in the file to the expected value in the data schema
You would have to set error to use a default value in case of error
Hope this helps,
Thanks
Denis
Hello @AC_Dev
You can add a split before your update data activity and only accept where the value is A.B and C.
Or
You can add a condition in the "Taken into account if" section of the update data activity to only update records when A,B or C is coming in the data.
Views
Replies
Total Likes
Thanks Manoj for the alternatives but that include extra check at workflow level , since we are creating Enums as closed Type so expectation was even if we try to insert value to this field system should restrict it and give some errors.
Views
Replies
Total Likes
Hi @AC_Dev
You can achieve the fixed list at the Load Activity level.
Edit the format
Select the field you want to format and click on the Detail magnifying icon
In the Details, use the Remapping section to fill in the expected values from the value in the file to the expected value in the data schema
You would have to set error to use a default value in case of error
Hope this helps,
Thanks
Denis