We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

UserImportFullJob is getting failed while importing Users

LearningStar
New Contributor III
New Contributor III

Hi Team,

One job with category : UserImportfull is getting failed it say 

Field 'ENABLED' doesn't have a default value

while my Import mapping has all the details which is required for import, I am attaching the Import mapper for your reference, not able to understand why this error I am getting.

 

<dataMapping>
<before-import>
 
</before-import>
    <sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="username">
        <![CDATA[SELECT EMPNO as EMPNO,Lname as LASTNAME ,Fname as FIRSTNAME, DEPT as DepartmentName, CASE WHEN EMPTYPE='E' THEN 'EMPLOYEE' WHEN EMPTYPE='C' THEN 'CONTRACTOR' ELSE 'EMPCONT' END AS EMPTYPE,CASE WHEN STATUS='Active' THEN '1' ELSE'0' END AS USERSTATUS,'TRUE' AS ISENABLED,'Welcome@321' as PASSWORD,EMAIL AS EMAIL from HRMSUSERS]]>
    </sql-query>
    <importsettings>
        <zeroDayProvisioning>false</zeroDayProvisioning>
        <generateEmail>true</generateEmail>
        <userNotInFileAction>NOACTION</userNotInFileAction>
        <checkRules>false</checkRules>
        <buildUserMap>false</buildUserMap>
        <generateSystemUsername>false</generateSystemUsername>
        <userOperationsAllowed>UPDATE</userOperationsAllowed>
        <userReconcillationField>username</userReconcillationField>
    </importsettings>
    <mapper description="This is the mapping field for Saviynt Field name" ifusernotexists="noaction" ENABLED="TRUE">
        <mapfield saviyntproperty="username" sourceproperty="EMPNO" type="character"/>
        <mapfield saviyntproperty="EMPLOYEEID" sourceproperty="EMPNO" type="character"></mapfield>
        <mapfield saviyntproperty="FIRSTNAME" sourceproperty="FIRSTNAME" type="character"></mapfield>
        <mapfield saviyntproperty="LASTNAME" sourceproperty="LASTNAME" type="character"></mapfield>
        <mapfield saviyntproperty="EMPLOYEETYPE" sourceproperty="EMPTYPE" type="character"></mapfield>
        <mapfield saviyntproperty="PASSWORD" sourceproperty="PASSWORD" type="character"></mapfield>
<mapfield saviyntproperty="STATUSKEY" sourceproperty="USERSTATUS" type="character"></mapfield>
        <mapfield saviyntproperty="EMAIL" sourceproperty="EMAIL" type="character"/>
        <mapfield saviyntproperty="customproperty21" sourceproperty="LASTNAME" type="character"/>
    </mapper>
<after-import description="EMAIL,BATCH,SQL">
</after-import>
</dataMapping>
4 REPLIES 4

AmitM
Regular Contributor III
Regular Contributor III

Hi @LearningStar ,

Try setting enabled as 1 instead of True. Do following changes:

  • Remove ENABLED="TRUE" from line 18 that is mapper description
  • 'TRUE' AS ISENABLED, change this to 1 as ISENABLED (Note : 1 is integer so don't make it string)
  •  Same as above USERSTATUS ALSO 1 or 0 not '1' or '0'. That is also Integer.

Use below two mappings

<mapfield saviyntproperty="enabled" sourceproperty="ISENABLED" type="number"></mapfield>

<mapfield saviyntproperty="statuskey" sourceproperty="USERSTATUS" type="number"></mapfield>

It would like below after changes. I haven't validated everything and the below might not the best XML for user import but to solve your challenge please try.

<dataMapping>
<before-import>

</before-import>
<sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="username">
<![CDATA[SELECT EMPNO as EMPNO,Lname as LASTNAME ,Fname as FIRSTNAME, DEPT as DepartmentName, CASE WHEN EMPTYPE='E' THEN 'EMPLOYEE' WHEN EMPTYPE='C' THEN 'CONTRACTOR' ELSE 'EMPCONT' END AS EMPTYPE,CASE WHEN STATUS='Active' THEN 1 ELSE 0 END AS USERSTATUS,1 AS ISENABLED,'Welcome@321' as PASSWORD,EMAIL AS EMAIL from HRMSUSERS]]>
</sql-query>
<importsettings>
<zeroDayProvisioning>false</zeroDayProvisioning>
<generateEmail>true</generateEmail>
<userNotInFileAction>NOACTION</userNotInFileAction>
<checkRules>false</checkRules>
<buildUserMap>false</buildUserMap>
<generateSystemUsername>false</generateSystemUsername>
<userOperationsAllowed>UPDATE</userOperationsAllowed>
<userReconcillationField>username</userReconcillationField>
</importsettings>
<mapper description="This is the mapping field for Saviynt Field name" ifusernotexists="noaction">
<mapfield saviyntproperty="username" sourceproperty="EMPNO" type="character"/>
<mapfield saviyntproperty="EMPLOYEEID" sourceproperty="EMPNO" type="character"></mapfield>
<mapfield saviyntproperty="FIRSTNAME" sourceproperty="FIRSTNAME" type="character"></mapfield>
<mapfield saviyntproperty="LASTNAME" sourceproperty="LASTNAME" type="character"></mapfield>
<mapfield saviyntproperty="EMPLOYEETYPE" sourceproperty="EMPTYPE" type="character"></mapfield>
<mapfield saviyntproperty="PASSWORD" sourceproperty="PASSWORD" type="character"></mapfield>
<mapfield saviyntproperty="enabled" sourceproperty="ISENABLED" type="number"></mapfield>
<mapfield saviyntproperty="statuskey" sourceproperty="USERSTATUS" type="number"></mapfield>
<mapfield saviyntproperty="EMAIL" sourceproperty="EMAIL" type="character"/>
<mapfield saviyntproperty="customproperty21" sourceproperty="LASTNAME" type="character"/>
</mapper>
<after-import description="EMAIL,BATCH,SQL">
</after-import>
</dataMapping>

Thanks,

Amit

If helped, Please ACCEPT SOLUTION and hit KUDOS.

rushikeshvartak
All-Star
All-Star

No property in mapper called ENABLED="TRUE"

use below

<?xml version="1.0" encoding="UTF-8"?>
<dataMapping>
   <before-import />
   <sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="username"><![CDATA[SELECT EMPNO as EMPNO,Lname as LASTNAME ,Fname as FIRSTNAME, DEPT as DepartmentName, CASE WHEN EMPTYPE='E' THEN 'EMPLOYEE' WHEN EMPTYPE='C' THEN 'CONTRACTOR' ELSE 'EMPCONT' END AS EMPTYPE,CASE WHEN STATUS='Active' THEN '1' ELSE'0' END AS USERSTATUS,'TRUE' AS ISENABLED,'Welcome@321' as PASSWORD,EMAIL AS EMAIL from HRMSUSERS]]></sql-query>
   <importsettings>
      <zeroDayProvisioning>false</zeroDayProvisioning>
      <generateEmail>true</generateEmail>
      <userNotInFileAction>NOACTION</userNotInFileAction>
      <checkRules>false</checkRules>
      <buildUserMap>false</buildUserMap>
      <generateSystemUsername>false</generateSystemUsername>
      <userOperationsAllowed>UPDATE</userOperationsAllowed>
      <userReconcillationField>username</userReconcillationField>
   </importsettings>
   <mapper description="This is the mapping field for Saviynt Field name" ifusernotexists="noaction" ENABLED="TRUE">
      <mapfield saviyntproperty="username" sourceproperty="EMPNO" type="character" />
      <mapfield saviyntproperty="EMPLOYEEID" sourceproperty="EMPNO" type="character" />
      <mapfield saviyntproperty="FIRSTNAME" sourceproperty="FIRSTNAME" type="character" />
      <mapfield saviyntproperty="LASTNAME" sourceproperty="LASTNAME" type="character" />
      <mapfield saviyntproperty="EMPLOYEETYPE" sourceproperty="EMPTYPE" type="character" />
      <mapfield saviyntproperty="PASSWORD" sourceproperty="PASSWORD" type="character" />
      <mapfield saviyntproperty="STATUSKEY" sourceproperty="USERSTATUS" type="character" />
      <mapfield saviyntproperty="EMAIL" sourceproperty="EMAIL" type="character" />
      <mapfield saviyntproperty="customproperty21" sourceproperty="LASTNAME" type="character" />
   </mapper>
   <after-import description="EMAIL,BATCH,SQL" />
</dataMapping>

Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi Rushikesh, 

Even after using your provided mappers I am getting same error as below .

LearningStar_0-1707293636938.png

I am adding one more image of my target so that you will be able to have better understanding 

LearningStar_1-1707294101656.png

 

I hope your issue is resolved


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.