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

AccountsImport for Database Connector

Mortal
New Contributor III
New Contributor III

Hi, facing some issues in AccountsImport for DB Connector and following below configuration:

<dataMapping>
<sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="name" >
<![CDATA[select accountname,'MySQL_DB Connector' as securitysystem,'MySQL_DB Connector' as endpoint, 'Groups' as entitlementtype,null as entitlementvalue, 1 as status from accounts]]>
</sql-query>
<mapper description="This is the mapping field for Saviynt Field name" accountnotinfileaction="Suspend" deleteaccountentitlement="true" ifusernotexists="noaction">
<mapfield saviyntproperty="accounts.name" sourceproperty="accountName" type="character"/>
<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"/>
<mapfield saviyntproperty="accounts.status" sourceproperty="status" type="character"/>
</mapper>
</dataMapping>

And getting following error: No signature of method:" java.lang.Long.replace() is applicable for argument types: (java.lang.String, java.lang.String) values: [\, \\]"

 
 
Thanks,
Ketan
7 REPLIES 7

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @Mortal,

Can you please try with the below XML,

 

<dataMapping>
	<sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="name" >
		<![CDATA[select accountname,'MySQL_DB Connector' as securitysystem,'MySQL_DB Connector' as endpoint, 'Groups' as entitlementtype,null as entitlementvalue, 1 as status from accounts]]>
	</sql-query>
	<mapper description="This is the mapping field for Saviynt Field name" accountnotinfileaction="Suspend" deleteaccountentitlement="true" ifusernotexists="noaction">
		<mapfield saviyntproperty="accounts.name" sourceproperty="accountname" type="character"/>
		<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"/>
		<mapfield saviyntproperty="accounts.status" sourceproperty="status" type="character"/>
	</mapper>
</dataMapping>

 

For Ref: 
https://forums.saviynt.com/t5/identity-governance/database-account-import-from-mssql-server-is-faili... 

Thanks,

Mortal
New Contributor III
New Contributor III

Hi @sudeshjaiswal ,

 I have checked both the xml file and both are same only. I tried using xml which you have given me but the result is same. still getting the same error. Is there any way to solve the above problem?

Thanks

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @Mortal,

Both are not similar, see the accountname in the query and in the mapping, both are in different case.
Did you try add use CAST in the query,

<dataMapping>
	<sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="name" >
		<![CDATA[select CAST(accountname AS VARCHAR) AS accountname,'MySQL_DB Connector' as securitysystem,'MySQL_DB Connector' as endpoint, 'Groups' as entitlementtype,null as entitlementvalue, 1 as status from accounts]]>
	</sql-query>
	<mapper description="This is the mapping field for Saviynt Field name" accountnotinfileaction="Suspend" deleteaccountentitlement="true" ifusernotexists="noaction">
		<mapfield saviyntproperty="accounts.name" sourceproperty="accountname" type="character"/>
		<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"/>
		<mapfield saviyntproperty="accounts.status" sourceproperty="status" type="character"/>
	</mapper>
</dataMapping>

Thanks

Mortal
New Contributor III
New Contributor III

Hello @sudeshjaiswal,

I did some changes in import query and accounts are getting imported.

Thanks

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @Mortal,
Thats the great news!
Thanks for the confirmation,
It would be great if you can share your working XML here, so that people can use it for reference, and also mentioned what all changed you did to make it work.

Thanks.

Mortal
New Contributor III
New Contributor III

Hello @sudeshjaiswal,

Currently I'm using following XML for account import and it is working fine. The change which I made was for status parameter mapping. The datatype to map status parameter with Saviynt property should be number because it takes Active for '1' and Inactive for '0'.

<dataMapping>
<sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="name" >
<![CDATA[select accountname,securitysystem,endpoint,entitlementtype,entitlementvalue,status from accounts]]>
</sql-query>
<mapper description="This is the mapping field for Saviynt Field name" accountnotinfileaction="Suspend" deleteaccountentitlement="true" ifusernotexists="noaction">
<mapfield saviyntproperty="accounts.name" sourceproperty="accountName" type="character"/>
<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"/>
<mapfield saviyntproperty="accounts.status" sourceproperty="status" type="number"/>
</mapper>
</dataMapping>

 

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Thanks for the confirmining and providing the info,
It would be benificial for other forums users as well.

Thanks.