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

SAV4SAV Db job throwing an sql syntax error

shubhangsinha_
New Contributor III
New Contributor III

Hello Everyone, 

 

We are trying to copy the email of the account owner into the customproperty of the same account , for the same we have written the below query which works fine in data analyzer but fails for SAV4SAV db import , meanwhile I try to fetch the logs in details, anyone has an idea What could be wrong in this?--->

 

<dataMapping>
<sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="name" >
<![CDATA[
SELECT a.name AS accountid,
'Test_Endpoint' as endpointname,
'Test_Endpoint' as securitysystem,
u.email as 'email'
from
accounts a,accountowners ao,users u
where a.endpointkey = 12
AND a.ACCOUNTKEY = ao.ACCOUNTKEY
AND u.USERKEY = ao.owneruserkey]]>
</sql-query>
<mapper description="This is the mapping field for Saviynt Field name" accountnotinfileaction="noaction" deleteaccountentitlement="true" ifusernotexists="noaction">
<mapfield saviyntproperty="name" sourceproperty="accountid" type="character"/>
<mapfield saviyntproperty="customproperty17" sourceproperty="email" type="character"/>
<mapfield saviyntproperty="securitysystems.systemname" sourceproperty="securitysystem" type="character"/>
<mapfield saviyntproperty="endpoints.endpointname" sourceproperty="endpointname" type="character"/>
</mapper>
</dataMapping>

2 REPLIES 2

RakeshMG
Saviynt Employee
Saviynt Employee

Please try removing "ao" from accountowners ao. Use any other letter.

Also please share the error snippet.


​Regards

Rakesh M Goudar

dgandhi
All-Star
All-Star

Please use this, it will fix your issue.

<dataMapping>
<sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="name" >
<![CDATA[
SELECT a.name AS accountid,
'Test_Endpoint' as endpointname,
'Test_Endpoint' as securitysystem,
u.email as 'email'
from
accounts a,accountowners ao,users u
where a.endpointkey = 12
AND a.ACCOUNTKEY = ao.ACCOUNTKEY
AND u.USERKEY = ao.owneruserkey]]>
</sql-query>
<mapper description="This is the mapping field for Saviynt Field name" accountnotinfileaction="noaction" deleteaccountentitlement="true" ifusernotexists="noaction">
<mapfield saviyntproperty="name" sourceproperty="accountid" type="character"/></mapfield>
<mapfield saviyntproperty="customproperty17" sourceproperty="email" type="character"/></mapfield>
<mapfield saviyntproperty="securitysystems.systemname" sourceproperty="securitysystem" type="character"/></mapfield>
<mapfield saviyntproperty="endpoints.endpointname" sourceproperty="endpointname" type="character"/></mapfield>
</mapper>
</dataMapping>

Thanks

Thanks,
Devang Gandhi
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.