Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Getting error while importing the account from DB connection to saviynt

Sekhar
Regular Contributor
Regular Contributor

Hi,

Iam trying to import the accounts from DB connection to saviynt but it is not importing.

used Query:

<dataMapping>
<sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="name">
<![CDATA[
select
sam_account_name as 'USERID',
employee_id as 'EMPLOYEEID',
'endpoint' as 'endpoint',
'securitysystem' as 'securitysystem',
'Active' as 'status',
upn as 'accountcn',
email_address as 'emailAdd',
ad_guid as 'Guid',
ad_account_status as 'accStatus',
utc_created_ts as 'createdDate',
utc_modified_ts as 'modifiedDate'
from [DB name]
]]>
</sql-query>
<mapper description="This is the mapping field for Saviynt Field name" accountnotinfileaction="noaction" deleteaccountentitlement="true" dateformat="timestamp" ifusernotexists="noaction">
<mapfield saviyntproperty="accounts.name" sourceproperty="USERID" type="character"/>
<mapfield saviyntproperty="securitysystems.systemname" sourceproperty="securitysystem" type="character"/>
<mapfield saviyntproperty="endpoints.endpointname" sourceproperty="endpoint" type="character"/>
<mapfield saviyntproperty="accounts.status" sourceproperty="status" type="character"/>
<mapfield saviyntproperty="accounts.accountID" sourceproperty="accountcn" type="character"/>
<mapfield saviyntproperty="users.username" sourceproperty="accountcn" type="character"/>
<mapfield saviyntproperty="accounts.customproperty1" sourceproperty="EMPLOYEEID" type="character"/>
<mapfield saviyntproperty="accounts.customproperty2" sourceproperty="emailAdd" type="character"/>
<mapfield saviyntproperty="accounts.customproperty3" sourceproperty="Guid" type="character"/>
<mapfield saviyntproperty="accounts.customproperty4" sourceproperty="accStatus" type="character"/>
<mapfield saviyntproperty="accounts.customproperty5" sourceproperty="createdDate" type="date"/>
<mapfield saviyntproperty="accounts.customproperty6" sourceproperty="modifiedDate" type="date"/>
</mapper>
</dataMapping>

 

Error:

No signature of method: [B.replace() is applicable for argument types: (java.lang.String, java.lang.String) values: [\, \\]

 

Could you please anyone help me in this issue.

 

Thanks,

Sekhar

12 REPLIES 12

NM
Honored Contributor II
Honored Contributor II

@Sekhar , update status 

<mapfield saviyntproperty="accounts.status" sourceproperty="status" type="number"/>

Sekhar
Regular Contributor
Regular Contributor

Hi @NM 

I tried above one but it is giving same error again.

 

NM
Honored Contributor II
Honored Contributor II

@Sekhar share debug logs

SumathiSomala
All-Star
All-Star

@Sekhar What are the possible values for status?

Replace the actual name od ep and ss name in the query

'<endpointname>' as 'endpoint',
'<securitysystemname>' as 'securitysystem',

 

Regards,
Sumathi Somala

If this reply answered your question, please Accept As Solution and give Kudos.

Raghu
All-Star
All-Star

@Sekhar  try below

 

<dataMapping>
<sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="name">
<![CDATA[
select
sam_account_name as 'USERID',
employee_id as 'EMPLOYEEID',
'endpoint' as endpoint,
'securitysystem' as securitysystem,
'1' as 'status',
upn as 'accountcn',
email_address as 'emailAdd',
ad_guid as 'Guid',
ad_account_status as 'accStatus',
utc_created_ts as 'createdDate',
utc_modified_ts as 'modifiedDate'
from [DB name]
]]>
</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" accountnotinfileaction="noaction" deleteaccountentitlement="true" dateformat="date" ifusernotexists="noaction" systems="'securitysystem'">
<mapfield saviyntproperty="accounts.name" sourceproperty="USERID" type="character"/>
<mapfield saviyntproperty="securitysystems.systemname" sourceproperty="securitysystem" type="character"/>
<mapfield saviyntproperty="endpoints.endpointname" sourceproperty="endpoint" type="character"/>
<mapfield saviyntproperty="accounts.status" sourceproperty="status" type="character"/>
<mapfield saviyntproperty="accounts.accountID" sourceproperty="accountcn" type="character"/>
<mapfield saviyntproperty="users.username" sourceproperty="accountcn" type="character"/>
<mapfield saviyntproperty="accounts.customproperty1" sourceproperty="EMPLOYEEID" type="character"/>
<mapfield saviyntproperty="accounts.customproperty2" sourceproperty="emailAdd" type="character"/>
<mapfield saviyntproperty="accounts.customproperty3" sourceproperty="Guid" type="character"/>
<mapfield saviyntproperty="accounts.customproperty4" sourceproperty="accStatus" type="character"/>
<mapfield saviyntproperty="accounts.customproperty5" sourceproperty="createdDate" type="date"/>
<mapfield saviyntproperty="accounts.customproperty6" sourceproperty="modifiedDate" type="date"/>
</mapper>
</dataMapping>


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

rushikeshvartak
All-Star
All-Star

<dataMapping>
<sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="name">
<![CDATA[
select
sam_account_name as 'USERID',
employee_id as 'EMPLOYEEID',
'endpoint' as 'endpoint',
'securitysystem' as 'securitysystem',
1 as 'status',
upn as 'accountcn',
email_address as 'emailAdd',
ad_guid as 'Guid',
ad_account_status as 'accStatus',
utc_created_ts as 'createdDate',
utc_modified_ts as 'modifiedDate'
from [DB name]
]]>
</sql-query>
<mapper description="This is the mapping field for Saviynt Field name" accountnotinfileaction="noaction" deleteaccountentitlement="true" dateformat="timestamp" ifusernotexists="noaction">
<mapfield saviyntproperty="accounts.name" sourceproperty="USERID" type="character"/>
<mapfield saviyntproperty="securitysystems.systemname" sourceproperty="securitysystem" type="character"/>
<mapfield saviyntproperty="endpoints.endpointname" sourceproperty="endpoint" type="character"/>
<mapfield saviyntproperty="accounts.status" sourceproperty="status" type="number"/>
<mapfield saviyntproperty="accounts.accountID" sourceproperty="accountcn" type="character"/>
<mapfield saviyntproperty="users.username" sourceproperty="accountcn" type="character"/>
<mapfield saviyntproperty="accounts.customproperty1" sourceproperty="EMPLOYEEID" type="character"/>
<mapfield saviyntproperty="accounts.customproperty2" sourceproperty="emailAdd" type="character"/>
<mapfield saviyntproperty="accounts.customproperty3" sourceproperty="Guid" type="character"/>
<mapfield saviyntproperty="accounts.customproperty4" sourceproperty="accStatus" type="character"/>
<mapfield saviyntproperty="accounts.customproperty5" sourceproperty="createdDate" type="date"/>
<mapfield saviyntproperty="accounts.customproperty6" sourceproperty="modifiedDate" type="date"/>
</mapper>
</dataMapping>


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hi @rushikeshvartak 

If i remove the GUID mapping in the above query then working fine else still getting same error.

No signature of method: [B.replace() is applicable for argument types: (java.lang.String, java.lang.String) values: [\, \\]

I need to add GUID as well, please suggest how can i add it.

 

Thanks,

Sekhar

 

@Sekhar what is the datatype for GUID in the database?

then adjust the mapping

<mapfield saviyntproperty="accounts.customproperty3" sourceproperty="Guid" type="Binary"/>

<mapfield saviyntproperty="accounts.customproperty3" sourceproperty="Guid" type="number"/>

Regards,
Sumathi Somala

If this reply answered your question, please Accept As Solution and give Kudos.

Sekhar
Regular Contributor
Regular Contributor

Hi @SumathiSomala ,

GUID datatype is varbinary in database.

I tried with <mapfield saviyntproperty="accounts.customproperty3" sourceproperty="Guid" type="Binary"/> .

Job is success but GUID value is not imported into CP.

 

Thanks,

Sekhar

What is target database ?

cast the data

SELECT CONVERT(varbinary_column USING utf8) AS char_column FROM your_table;


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hi @rushikeshvartak 

Target database is MS SQL SERVER.

I tried with below query but getting error i.e,  Incorrect syntax near 'USING'

I tried for GUID mapping as Varbinary & character but facing same error.

 

<dataMapping>
<sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="name">
<![CDATA[ 
select sam_account_name as 'USERID',
employee_id as 'EMPLOYEEID',
ENDPOINT as 'endpoint',
SYSTEM as 'securitysystem',
upn as 'accountcn',
email_address as 'emailAdd',
ad_account_status as 'accStatus',
CASE WHEN ad_account_status = 'Enabled' THEN 1 ELSE 0 END as 'status',
utc_created_ts as 'createdDate',
utc_modified_ts as 'modifiedDate',
CONVERT(ad_guid USING utf8)as 'Guid'
from TABLE ]]>
</sql-query>
<mapper description="This is the mapping field for Saviynt Field name" accountnotinfileaction="noaction" deleteaccountentitlement="true" ifusernotexists="noaction" dateformat="timestamp">
<mapfield saviyntproperty="accounts.name" sourceproperty="USERID" type="character"/>
<mapfield saviyntproperty="securitysystems.systemname" sourceproperty="securitysystem" type="character"/>
<mapfield saviyntproperty="endpoints.endpointname" sourceproperty="endpoint" type="character"/>
<mapfield saviyntproperty="accounts.status" sourceproperty="status" type="number"/>
<mapfield saviyntproperty="accounts.accountID" sourceproperty="accountcn" type="character"/>
<mapfield saviyntproperty="users.username" sourceproperty="accountcn" type="character"/>
<mapfield saviyntproperty="accounts.customproperty1" sourceproperty="EMPLOYEEID" type="character"/>
<mapfield saviyntproperty="accounts.customproperty2" sourceproperty="emailAdd" type="character"/>
<mapfield saviyntproperty="accounts.customproperty3" sourceproperty="Guid" type="varbinary"/>
<mapfield saviyntproperty="accounts.customproperty4" sourceproperty="accStatus" type="character"/>
<mapfield saviyntproperty="accounts.customproperty5" sourceproperty="createdDate" type="date"/>
<mapfield saviyntproperty="accounts.customproperty6" sourceproperty="modifiedDate" type="date"/> 
 
</mapper>
</dataMapping>
 
Thanks.
Sekhar

-- Using CAST
SELECT CAST(your_varbinary_column AS CHAR(length)) AS your_char_column
FROM your_table;

-- Using CONVERT
SELECT CONVERT(CHAR(length), your_varbinary_column) AS your_char_column
FROM your_table;


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.