07/19/2023 03:15 AM
I am importing 5 users from DB connection, but only one user is importing to saviynt.
i am using query like select employeecode,firstname,lastname,email,status from employee where employeecode in (111,112,113,114,115)
Only 1st user(111) is importing.
I want to import all users from DB what we give in where clause.
Can you please advise for me.
07/19/2023 03:24 AM
What did you mapped to username? Are you having same value for all five users assigning to username attribute.
Can you share the user import xml.
07/19/2023 04:13 AM
Hi @pmahalle ,
we mapped username to employeecode. Doesnt use same values for 5 users.
Can you see attached file.
Thanks,
Sekhar
07/19/2023 04:46 AM - edited 07/19/2023 04:50 AM
Hi @Sekhar ,
Is xeuserid different for all the users? Also I can see you mapped manager, manager value coming as emp id of the manager?
Can you map manager field to owner instead of manager in Saviynt like below and try:
<mapfield saviyntproperty="owner" sourceproperty="Manager" type="character"></mapfield>
If you are still facing the issue, please provide the logs.
07/19/2023 07:09 AM
hi @pmahalle
I tried what you said, still importing only one user. I am getting below error in logs.
ecm-worker-{"log":"2023-07-19 14:04:32,412 [quartzScheduler_Worker-6] DEBUG services.ImportSAvDataUserService - Not Importing user - either username attribute not found or if vendor is there then user doesnt have access to import the vendor
Thanks,
Sekhar
07/19/2023 07:28 AM
Hi @Sekhar ,
When you executed the same query on target DB, you are getting desired results? Also, is xeuserid different for all the users?
07/19/2023 10:56 PM
Hi, @pmahalle
We got desired results when i executed the same query in DB. xeuserid is the unique number, its is different for all users.
Thanks,
Sekhar
07/19/2023 04:54 AM
Hi @Sekhar ,
Please set the uniquecolumnsascommaseparated as username instead of employeecode and try.
Does running the above query on the target provide you the desired results?
Also, there are many date mappings defined as character. Can you check their datatypes on the target and define the mappings accordingly.
Thanks,
Armaan
07/19/2023 07:11 AM
Hi, @armaanzahir
I tried what you mentioned above, still getting same issue that is importing only one user.
Thanks,
Sekhar
07/19/2023 07:54 AM
Can you execute same query on target and share the output?
07/20/2023 04:46 AM
Can you reshare query
07/20/2023 05:01 AM
Hi @rushikeshvartak ,
SELECT employeeid,employeecode,firstnames,lastname,Manager,ManagerUserID,EmployeeType,terminationdate,plannedterminationdate,IIF((CONVERT(date,terminationdate) >= CONVERT(date,getdate())),1,
IIF(CONVERT(date,terminationdate) is null,1,0)) as STATUSKEY,'OldUser' ExistingUser,IIF(datediff(day,getdate(),startdate) in(0,1,2),'ProvisionNow','') ProvisionNow,DisplayName,TerminationMonth,EmployeeStatusCode,Company,EmployeeClass, EmployeeStatusDescription,Country,DepartmentCode, state,Postcode,Address1,Address2,Address3,DepartmentName,WorkEmail,PreferredName,StartDate, JobCode,MobilePhone,Email,XEUserId,LocationCode, LocationName, WorkAreaCode,WorkAreaName,PositionCode, PositionName,'\\DBNAME\users\' as HomeDirectory,CountryCode from [TABLE] where employeecode in ('978114','978115','978116','978117','978118')
Thanks,
Sekhar
07/20/2023 06:44 PM
<dataMapping>
<sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="username">
<![CDATA[SELECT employeeid,employeecode,firstnames,lastname,Manager,ManagerUserID,EmployeeType,terminationdate,plannedterminationdate,IIF((CONVERT(date,terminationdate) >= CONVERT(date,getdate())),1,
IIF(CONVERT(date,terminationdate) is null,1,0)) as STATUSKEY,'OldUser' ExistingUser,IIF(datediff(day,getdate(),startdate) in(0,1,2),'ProvisionNow','') ProvisionNow,DisplayName,TerminationMonth,EmployeeStatusCode,Company,EmployeeClass, EmployeeStatusDescription,Country,DepartmentCode, state,Postcode,Address1,Address2,Address3,DepartmentName,WorkEmail,PreferredName,StartDate, JobCode,MobilePhone,Email,XEUserId,LocationCode, LocationName, WorkAreaCode,WorkAreaName,PositionCode, PositionName,'\\DBNAME\users\' as HomeDirectory,CountryCode from [TABLE] where employeecode in ('978114','978115','978116','978117','978118');]]>
</sql-query>
<importsettings>
<zeroDayProvisioning>true</zeroDayProvisioning>
<userNotInFileAction>NOACTION</userNotInFileAction>
<checkRules>true</checkRules>
<buildUserMap>true</buildUserMap>
<generateSystemUsername>true</generateSystemUsername>
<generateEmail>true</generateEmail>
<userReconcillationField>username</userReconcillationField>
</importsettings>
<mapper description="This is the mapping field for Saviynt Field name" defaultrole="ROLE_END_USER" dateformat="date">
<mapfield saviyntproperty="username" sourceproperty="employeecode" type="character"></mapfield>
<mapfield saviyntproperty="systemUserName" sourceproperty="xeuserid" type="character"></mapfield>
<mapfield saviyntproperty="email" sourceproperty="workemail" type="character"></mapfield>
<mapfield saviyntproperty="manager" sourceproperty="Manager" type="character"></mapfield>
<mapfield saviyntproperty="employeeclass" sourceproperty="employeeclass" type="character"></mapfield>
<mapfield saviyntproperty="customproperty14" sourceproperty="HomeDirectory" type="character"></mapfield>
<mapfield saviyntproperty="state" sourceproperty="State" type="character"></mapfield>
<mapfield saviyntproperty="customproperty25" sourceproperty="ExistingUser" type="character"></mapfield>
<mapfield saviyntproperty="customproperty19" sourceproperty="ProvisionNow" type="character"></mapfield>
<mapfield saviyntproperty="customproperty15" sourceproperty="Postcode" type="character"></mapfield>
<mapfield saviyntproperty="employeeType" sourceproperty="EmployeeType" type="character"></mapfield>
<mapfield saviyntproperty="customproperty1" sourceproperty="employeestatuscode" type="character"></mapfield>
<mapfield saviyntproperty="customproperty2" sourceproperty="employeestatusdescription" type="character"></mapfield>
<mapfield saviyntproperty="firstname" sourceproperty="firstnames" type="character"></mapfield>
<mapfield saviyntproperty="lastname" sourceproperty="lastname" type="character"></mapfield>
<mapfield saviyntproperty="displayname" sourceproperty="DisplayName" type="character"></mapfield>
<mapfield saviyntproperty="preferedFirstName" sourceproperty="PreferredName" type="character"></mapfield>
<mapfield saviyntproperty="startdate" sourceproperty="startdate" type="character"></mapfield>
<mapfield saviyntproperty="enddate" sourceproperty="terminationdate" type="character"></mapfield>
<mapfield saviyntproperty="customproperty17" sourceproperty="TerminationMonth" type="character"></mapfield>
<mapfield saviyntproperty="statuskey" sourceproperty="statuskey" type="character"></mapfield>
<mapfield saviyntproperty="departmentNumber" sourceproperty="DepartmentCode" type="character"></mapfield>
<mapfield saviyntproperty="departmentname" sourceproperty="DepartmentName" type="character"></mapfield>
<mapfield saviyntproperty="location" sourceproperty="LocationName" type="character"></mapfield>
<mapfield saviyntproperty="companyname" sourceproperty="Company" type="character"></mapfield>
<mapfield saviyntproperty="locationnumber" sourceproperty="LocationCode" type="character"></mapfield>
<mapfield saviyntproperty="customproperty3" sourceproperty="WorkAreaCode" type="character"></mapfield>
<mapfield saviyntproperty="customproperty4" sourceproperty="WorkAreaName" type="character"></mapfield>
<mapfield saviyntproperty="jobCode" sourceproperty="PositionCode" type="character"></mapfield>
<mapfield saviyntproperty="jobdescription" sourceproperty="PositionName" type="character"></mapfield>
<mapfield saviyntproperty="phonenumber" sourceproperty="MobilePhone" type="character"></mapfield>
<mapfield saviyntproperty="secondaryEmail" sourceproperty="Email" type="character"></mapfield>
<mapfield saviyntproperty="country" sourceproperty="country" type="character"></mapfield>
<mapfield saviyntproperty="customproperty13" sourceproperty="CountryCode" type="character"></mapfield>
<mapfield saviyntproperty="termDate" sourceproperty="PlannedTerminationDate" type="date"></mapfield>
</mapper>
<after-import description="EMAIL,BATCH,SQL"></after-import>
</dataMapping>
07/31/2023 10:58 PM
Hi @rushikeshvartak ,
i tried with above query, but still importing one user from DB to saviynt.
Regards,
Sekhar.
08/01/2023 12:05 AM - edited 08/01/2023 12:05 AM
Hi @Sekhar ,
From the summary screenshot above seems like 11 users got updated. Make sure all the users you want to be created have unique username in your target DB and not present in Saviynt already.