Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Database Account Import is failing.

Karthik9
New Contributor
New Contributor

Hi,

I am doing the Account import from database but getting the following error after running the job.

Column count doesn't match value count at row 1

Karthik9_0-1711377536701.png

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1

Following is the accounts import XML that I have configured - 

<dataMapping>
<before-import>
</before-import>
<sql-query description="This is the Source DB Query">
<![CDATA[
SELECT Id as accountname,FirstName,LastName,Phone,Email,RoleId,ReportingResourceId, 'Zknow'as systemname, 'Zknow'as endpointname, '1' as accountstatus,'role' as entitlementtype,'' as entitlementvalue from Resource
]]>
</sql-query>
<mapper description="This is the mapping field for Saviynt Field name" deleteaccountentitlement="true" ifusernotexists="noaction">
<mapfield saviyntproperty="accounts.name" sourceproperty="accountname" type="int, not null"></mapfield>
<mapfield saviyntproperty="accounts.customproperty3" sourceproperty="FirstName" type="character"></mapfield>
<mapfield saviyntproperty="accounts.customproperty4" sourceproperty="LastName" type="character"></mapfield>
<mapfield saviyntproperty="accounts.customproperty6" sourceproperty="Phone" type="character"></mapfield>
<mapfield saviyntproperty="accounts.customproperty8" sourceproperty="Email" type="character"></mapfield>
<mapfield saviyntproperty="accounts.customproperty7" sourceproperty="RoleId" type="int"></mapfield>
<mapfield saviyntproperty="accounts.customproperty9" sourceproperty="ReportingResourceId" type="int"></mapfield>
<mapfield saviyntproperty="securitysystems.systemname" sourceproperty="systemname" type="character"></mapfield>
<mapfield saviyntproperty="endpoints.endpointname" sourceproperty="endpointname" type="character"></mapfield>
<mapfield saviyntproperty="accounts.status" sourceproperty="accountstatus" type="character"></mapfield>
<mapfield saviyntproperty="entitlementtypes.entitlementname" sourceproperty="entitlementtype" type="character"></mapfield>
<mapfield saviyntproperty="entitlementvalues.entitlementvalue" sourceproperty="entitlementvalue" type="character"></mapfield>

</mapper>
<after-import description="EMAIL,BATCH,SQL">
</after-import>
</dataMapping>

 

8 REPLIES 8

CR
Regular Contributor III
Regular Contributor III

it is new implementation or exit?

account.name is char, canyou change it and chek

<mapfield saviyntproperty="accounts.name" sourceproperty="accountname" type="int, not null"></mapfield>

to
<mapfield saviyntproperty="accounts.name" sourceproperty="accountname" type="character"></mapfield>


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

Karthik9
New Contributor
New Contributor

Hi Raghu, 

New Implementation

Id as accountname passed in the select query backend Id is int 

I had modified the account.name to character but still getting error after running the job.

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1

Karthik9_0-1711444933887.png

 

 

Hi Raghu,

FYR, I attached all the tables details & Colum and how today users are creating into system.

Karthik9_1-1711445310039.png

 

CR
Regular Contributor III
Regular Contributor III

try below on

 

<dataMapping>
    <before-import>
</before-import>
    <sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="name">
        <![CDATA[
SELECT Id as accountname,FirstName,LastName,Phone,Email,RoleId,ReportingResourceId,'Zknow' as systemname,'Zknow' as endpointname, '1' as accountstatus,'role' as entitlementtype,'' as entitlementvalue from Resource
 ]]>
</sql-query>
<importsettings>
<zeroDayProvisioning>false</zeroDayProvisioning>
<userNotInFileAction>NOACTION</userNotInFileAction>
<checkRules>false</checkRules>
<buildUserMap>false</buildUserMap>
</importsettings>
<mapper description="This is the mapping field for Saviynt Field name" checkrules="false" buildusermap="false" accountnotinfileaction="noaction" deleteaccountentitlement="false" ifusernotexists="noaction" dateformat="date" incrementalcolumn="accounts.customproperty5" systems="'Zknow' ">
    <mapfield sourceproperty="systemname" saviyntproperty="securitysystems.systemname"  type="character"></mapfield>
    <mapfield sourceproperty="endpoint" saviyntproperty="endpoints.endpointname"  type="character"></mapfield>
    <mapfield sourceproperty="accountname" saviyntproperty="accounts.name" type="character"></mapfield>
<mapfield sourceproperty="Status" saviyntproperty="accounts.status" type="character"></mapfield>
    <mapfield sourceproperty="ABCDuserid" saviyntproperty="accounts.customproperty4" type="character"></mapfield>
<mapfield sourceproperty="ReportingResourceId" saviyntproperty="accounts.customproperty9" type="character"></mapfield>
<mapfield sourceproperty="RoleId" saviyntproperty="accounts.customproperty7" type="character"></mapfield>
<mapfield sourceproperty="Email" saviyntproperty="accounts.customproperty8" type="character"></mapfield>
<mapfield sourceproperty="Firstname" saviyntproperty="accounts.customproperty3" type="character"></mapfield>
<mapfield sourceproperty="Lastname" saviyntproperty="accounts.customproperty4" type="character"></mapfield>
<mapfield sourceproperty="Phone" saviyntproperty="accounts.customproperty6" type="character"></mapfield>
<mapfield type="character" sourceproperty="entitlementtype" saviyntproperty="entitlementtypes.entitlementname" ></mapfield>
<mapfield type="character" sourceproperty="entitlement" saviyntproperty="entitlementvalues.entitlementvalue" ></mapfield>
<mapfield saviyntproperty="accounts.status" sourceproperty="accountstatus" type="character"></mapfield>
 
 
</mapper>
    <after-import description="EMAIL,BATCH,SQL">
</after-import>
 
</dataMapping>

Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

Karthik9
New Contributor
New Contributor

Hi Raghu,

I tried by passing the above xml but still getting the errors like: No such property: endpoint for class: groovy.sql.GroovyRowResult, No such property: entitlement for class: groovy.sql.GroovyRowResult, No such property: endpoint for class: groovy.sql.GroovyRowResult

I have changed the xml. I'm stuck with older error Column count doesn't match value count at row 1

Karthik9_0-1711533423512.png

 

<dataMapping>
<before-import>
</before-import>
<sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="name">
<![CDATA[
SELECT Id ,FirstName,LastName,Phone,Email as accountname,RoleId,ReportingResourceId,'Zknow' as systemname,'Zknow' as endpointname, '1' as accountstatus,'role' as entitlementtype,'' as entitlementvalue from Resource
]]>
</sql-query>
<importsettings>
<zeroDayProvisioning>false</zeroDayProvisioning>
<userNotInFileAction>NOACTION</userNotInFileAction>
<checkRules>false</checkRules>
<buildUserMap>false</buildUserMap>
</importsettings>
<mapper description="This is the mapping field for Saviynt Field name" checkrules="false" buildusermap="false" accountnotinfileaction="noaction" deleteaccountentitlement="false" ifusernotexists="noaction" dateformat="date" incrementalcolumn="accounts.customproperty5" systems="'Zknow' ">
<mapfield sourceproperty="systemname" saviyntproperty="securitysystems.systemname" type="character"></mapfield>
<mapfield sourceproperty="endpointname" saviyntproperty="endpoints.endpointname" type="character"></mapfield>
<mapfield sourceproperty="accountname" saviyntproperty="accounts.name" type="character"></mapfield>
<mapfield sourceproperty="Status" saviyntproperty="accounts.status" type="character"></mapfield>
<mapfield sourceproperty="ReportingResourceId" saviyntproperty="accounts.customproperty9" type="int"></mapfield>
<mapfield sourceproperty="RoleId" saviyntproperty="accounts.customproperty7" type="int"></mapfield>
<mapfield sourceproperty="Id" saviyntproperty="accounts.customproperty8" type="int"></mapfield>
<mapfield sourceproperty="Firstname" saviyntproperty="accounts.customproperty3" type="character"></mapfield>
<mapfield sourceproperty="Lastname" saviyntproperty="accounts.customproperty4" type="character"></mapfield>
<mapfield sourceproperty="Phone" saviyntproperty="accounts.customproperty6" type="character"></mapfield>
<mapfield type="character" sourceproperty="entitlementtype" saviyntproperty="entitlementtypes.entitlementname" ></mapfield>
<mapfield type="character" sourceproperty="entitlementvalue" saviyntproperty="entitlementvalues.entitlementvalue" ></mapfield>
<mapfield saviyntproperty="accounts.status" sourceproperty="accountstatus" type="character"></mapfield>


</mapper>
<after-import description="EMAIL,BATCH,SQL">
</after-import>

</dataMapping> 

CR
Regular Contributor III
Regular Contributor III

I Dm cp change please check and confirm 


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

Karthik9
New Contributor
New Contributor

Hi,

I have modified xml but stuck getting the errors like: Column count doesn't match value count at row 1

Karthik9_0-1712224490990.png

The Account Import XML below with the logs.

<dataMapping>
<sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="name" >
<![CDATA[select Id,FirstName,LastName,Phone,Email,RoleId,ReportingResourceId,'Zknow' as SECURITYSYSTEM,'ZKnow' as ENDPOINT,null as entitlementtype,null as entitlementvalue from Resource]]>
</sql-query>
<mapper description="This is the mapping field for Saviynt Field name" accountnotinfileaction="Suspend" deleteaccountentitlement="true" ifusernotexists="noaction">
<mapfield saviyntproperty="accounts.name" sourceproperty="Id" type="int"/>
<mapfield saviyntproperty="accounts.customproperty2" sourceproperty="FirstName" type="character"/>
<mapfield saviyntproperty="accounts.customproperty3" sourceproperty="LastName" type="character"/>
<mapfield saviyntproperty="accounts.customproperty4" sourceproperty="Phone" type="character"/>
<mapfield saviyntproperty="accounts.customproperty5" sourceproperty="Email" type="character"/>
<mapfield saviyntproperty="accounts.customproperty6" sourceproperty="RoleId" type="int"/>
<mapfield saviyntproperty="accounts.customproperty7" sourceproperty="ReportingResourceId" type="int"/>
<mapfield saviyntproperty="securitysystems.systemname" sourceproperty="SECURITYSYSTEM" type="character"/>
<mapfield saviyntproperty="endpoints.endpointname" sourceproperty="ENDPOINT" type="character"/>
<mapfield saviyntproperty="entitlementtypes.entitlementname" sourceproperty="entitlementtype" type="character"/>
<mapfield saviyntproperty="entitlementvalues.entitlementvalue" sourceproperty="entitlementvalue" type="character"/>
</mapper>
</dataMapping>

CR
Regular Contributor III
Regular Contributor III

bulid xml like below post try it

https://forums.saviynt.com/t5/identity-governance/oracle-db-entitlement-import-duplicate-entry/m-p/1...

 


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.