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

Analytics not creating disable account task

ARNAB86
Regular Contributor
Regular Contributor

Hi Team,

I have created one analytics below to disable the account

SELECT distinct a.accountkey AS acctKey, a.endpointkey, 'disableAccount' AS Default_Action_For_Analytics FROM accounts a JOIN user_accounts ua ON a.accountkey = ua.accountkey JOIN users u ON ua.userkey = u.userkey WHERE u.statuskey IN (1) AND a.endpointkey = 3
AND (DATEDIFF(STR_TO_DATE(u.customproperty53,'%Y-%m-%d %H:%i:%s'),CONVERT_TZ(current_timestamp,'+00:00','+10:00'))=0)
AND u.customproperty53 is not null AND u.customproperty54 is not null
AND STR_TO_DATE(u.customproperty53,'%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(CONVERT_TZ(current_timestamp,'+00:00','+10:00'),'%Y-%m-%d %H:%i:%s')
AND STR_TO_DATE(u.customproperty54,'%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(CONVERT_TZ(current_timestamp,'+00:00','+10:00'),'%Y-%m-%d %H:%i:%s')
AND a.status IN (1,'Manually Provisioned','Active')

Problem is first time the DisableAccount task gets created in pending task list now if i try to discontinue the task (from pending task list) and again run the analytics which is not creating the disableAccount task again.

But if i will delete the analytics history list then again the task is getting created after running the analytics.

Anything i am missing in analytic

ARNAB86_0-1721807279197.png

Please let me know

Thanks

Arnab Pal

 

5 REPLIES 5

pmahalle
All-Star
All-Star

Hi @ARNAB86 ,

Try below query and check once

SELECT distinct a.accountkey AS acctKey, a.endpointkey, 'disableAccount' AS Default_Action_For_Analytics, sysdate() as todaysDate FROM accounts a JOIN user_accounts ua ON a.accountkey = ua.accountkey JOIN users u ON ua.userkey = u.userkey WHERE u.statuskey IN (1) AND a.endpointkey = 3
AND (DATEDIFF(STR_TO_DATE(u.customproperty53,'%Y-%m-%d %H:%i:%s'),CONVERT_TZ(current_timestamp,'+00:00','+10:00'))=0)
AND u.customproperty53 is not null AND u.customproperty54 is not null
AND STR_TO_DATE(u.customproperty53,'%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(CONVERT_TZ(current_timestamp,'+00:00','+10:00'),'%Y-%m-%d %H:%i:%s')
AND STR_TO_DATE(u.customproperty54,'%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(CONVERT_TZ(current_timestamp,'+00:00','+10:00'),'%Y-%m-%d %H:%i:%s')
AND a.status IN (1,'Manually Provisioned','Active')


Pandharinath Mahalle(Paddy)
If this reply helps your question, please consider selecting Accept As Solution and hit Kudos 🙂

ARNAB86
Regular Contributor
Regular Contributor

Hi Paddy,

it's working means after deleting the task its creating the disableAccount task but problem is now how many times you run the analytics it's creating the disableAccount task that many times and showing in Pending task list.

But i believe if the task is already present it should not create the second one until i discontinue the previous task.

Please let me know.

Thanks

Arnab Pal 

@ARNAB86 ,

It will not create the task if already exists? Did you tried and created multiple?


Pandharinath Mahalle(Paddy)
If this reply helps your question, please consider selecting Accept As Solution and hit Kudos 🙂

ARNAB86
Regular Contributor
Regular Contributor

@pmahalle 

Actually, whenever i run the analytics job it's creating the disableAccount task.If the task is already there in pending task list it should not create the another task right.

if i run 5 times the analytic job its creating that many task.

 

ARNAB86_0-1721810844514.png

 

 

@ARNAB86 ,

In real time are you running it that many times before Provisioning job(WSRETRY)? If not then, it will not cause any issue, I guess.


Pandharinath Mahalle(Paddy)
If this reply helps your question, please consider selecting Accept As Solution and hit Kudos 🙂