Click HERE to see how Saviynt Intelligence is transforming the industry. |
12/15/2023 04:05 AM
Hi All,
We are trying to execute two different queries based on a condition using the DELETEACCOUNTJSON in a DB connector.
But we are seeing an error which just says Error while Executing delete query - <accountname>-Exception occured while Excecuting Query
please note that the individual queries work completely fine when we do not use the if-else condition.
Below are some sample JSONs we tried executing.
${task?.source!=null && task?.source.equals("ANALYTICS_V2")?
'{"DeleteAccountQry":["DROP USER \\"${accountName}\\""]}':
'{"DeleteAccountQry":["ALTER USER \\"${accountName}\\" ACCOUNT LOCK"]}'}
${task?.source!=null && task?.source.equals("ANALYTICS_V2")?
'"DeleteAccountQry":["DROP USER \\"${accountName}\\""]':
'"DeleteAccountQry":["ALTER USER \\"${accountName}\\" ACCOUNT LOCK"]'}
Could you please let us know if there is anything else that we can try here? Any help would be appreciated since we cannot see anything other details in the logs.
12/18/2023 09:25 AM
Hello @Raksha_NS ,
Could you please try to use
task?.source == ‘ANALYTICS_V2’
Thanks
12/18/2023 09:40 AM
Hi @sudeshjaiswal ,
I tried with task?.source == ‘ANALYTICS_V2’ and I still see the same error. The logs only say "Error while Executing delete query - <accountname>-Exception occured while Excecuting Query " and has no other details.
12/18/2023 03:49 PM
Use equalsIgnoreCase
12/18/2023 09:47 PM
Hello @Raksha_NS,
Can you please try with the below query,
${(task.source == 'ANALYTICS_V2')? '{\"DeleteAccountQry\":\"DROP USER '+accountName+'\"}':'{\"DeleteAccountQry\":\"ALTER USER '+accountName+' ACCOUNT LOCK\"}'} ${(task.source == 'analytics_v2')? '{\"DeleteAccountQry\":[ \"DROP USER ['+accountName+']\"]}':'{\"DeleteAccountQry\":[ \"ALTER USER ['+accountName+'] ACCOUNT LOCK\"]}'}
Thanks.
12/22/2023 03:40 AM
Hi @sudeshjaiswal ,
I tried the above query. It is giving me a JSON parse error and no other details.
Regards,
Raksha NS
12/26/2023 06:09 PM
share logs
02/06/2024 05:34 AM
Can you share current full json and screenshot
02/02/2024 08:50 AM
Hi @Raksha_NS
I'm checking internally with the product team for sample but in the meantime can you try configuring in below format:
{ "deleteaccountqry": "if else condition" }
Thanks