Click HERE to see how Saviynt Intelligence is transforming the industry. |
07/11/2024 06:17 PM
Hello,
I am working on to put manager in "OWNERONTERMINATE" field during User import job.
What I tried is.
{
"ADDITIONALTABLES": {
"USERS": "SELECT OWNERONTERMINATE,CUSTOMPROPERTY20, MANAGER FROM USERS"
},
"COMPUTEDCOLUMNS": [
"OWNERONTERMINATE"
],
"PREPROCESSQUERIES": [
"UPDATE NEWUSERDATA SET NEWUSERDATA.OWNERONTERMINATE = (SELECT USERS.userkey FROM USERS WHERE USERS.userkey = NEWUSERDATA.manager)"
]
}
but didn't work . can anyone help on this ?
Solved! Go to Solution.
07/11/2024 06:54 PM
This also does not work ....
{
"ADDITIONALTABLES": {
"USERS": "SELECT USERKEY,USERNAME FROM USERS"
},
"COMPUTEDCOLUMNS": [
"OWNERONTERMINATE"
],
"PREPROCESSQUERIES": [
"UPDATE NEWUSERDATA LEFT JOIN CURRENTUSERS ON NEWUSERDATA.MANAGER = CURRENTUSERS.USERKEY SET NEWUSERDATA.OWNERONTERMINATE=CURRENTUSER.USERKEY"
]
}
07/11/2024 07:13 PM
{
"ADDITIONALTABLES": {
"USERS": "SELECT USERNAME, MANAGER, OWNER FROM USERS"
},
"COMPUTEDCOLUMNS": [
"OWNERONTERMINATE"
],
"PREPROCESSQUERIES": [
"UPDATE NEWUSERDATA NU1 SET NU1.OWNERONTERMINATE = NU1.OWNER"
]
}
07/11/2024 07:57 PM
Hello Rushikesh,
I would need Manager's data to create a condition.
E.g)
CASE WHEN Manager.customproperty1 = "true"
NU.OWNERONTEMINATE= NU.OWNER
ELSE -
NU.OWNERONTEMINATE='' END
07/11/2024 09:03 PM
{
"ADDITIONALTABLES": {
"USERS": "SELECT USERNAME, MANAGER, OWNER,CUSTOMPROPETY1 FROM USERS"
},
"COMPUTEDCOLUMNS": [
"OWNERONTEMINATE"
],
"PREPROCESSQUERIES": [
"UPDATE NEWUSERDATA NU SET NU.OWNERONTEMINATE = CASE WHEN NU.CUSTOMPROPETY1 = 'true' THEN NU.OWNER ELSE '' END"
]
}
07/12/2024 01:15 AM
Thanks Rushikesh,
below works for me