Click HERE to see how Saviynt Intelligence is transforming the industry. |
07/03/2024 04:08 AM
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
07/03/2024 04:17 AM
@Sekhar , update status
<mapfield saviyntproperty="accounts.status" sourceproperty="status" type="number"/>
07/03/2024 04:22 AM
07/03/2024 04:25 AM
@Sekhar share debug logs
07/03/2024 04:39 AM
@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',
07/03/2024 06:28 AM
@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>
07/03/2024 09:05 PM - edited 07/03/2024 09:06 PM
<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>
07/04/2024 03:00 AM
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
07/04/2024 03:08 AM
@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"/>
07/04/2024 07:22 AM
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
07/04/2024 07:25 AM
What is target database ?
cast the data
SELECT CONVERT(varbinary_column USING utf8) AS char_column FROM your_table;
07/04/2024 08:06 AM
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.
07/04/2024 08:26 AM
-- 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;