Click HERE to see how Saviynt Intelligence is transforming the industry. |
05/21/2024 08:13 AM
Hi Team
I have the below preprocessor query in AD MODIFYUSERDATAJSON which works fine when i run import for few users using filter and the owner user is already present in Saviynt. it does not work when am running full user import.
{
"ADDITIONALTABLES":{
"USERS":"SELECT userkey, username, customproperty2 FROM USERS"
},
"COMPUTEDCOLUMNS":[
"owner"
],
"PREPROCESSQUERIES":[
"update newuserdata,currentusers set newuserdata.owner=currentusers.username where newuserdata.customproperty3 = currentusers.customproperty2"
]
}
Please assist.
Regards
Sangita Ladi
05/21/2024 10:28 AM - edited 05/21/2024 10:36 AM
{
"ADDITIONALTABLES": {
"USERS": "SELECT userkey, username, customproperty2 FROM USERS"
},
"COMPUTEDCOLUMNS": [
"owner"
],
"PREPROCESSQUERIES": [
"BEGIN TRANSACTION",
"update newuserdata set owner = (SELECT username FROM CURRENTUSERS WHERE newuserdata.customproperty3 = CURRENTUSERS.customproperty2)"
]
}
05/21/2024 10:35 AM
@sangitaladi : What are you storing in CP2 and CP3?
05/22/2024 09:11 AM
Hi @sangitaladi ,
{
"ADDITIONALTABLES": {
"USERS": "SELECT userkey, username, customproperty2 FROM USERS"
},
"COMPUTEDCOLUMNS": [
"manager"
],
"PREPROCESSQUERIES": [
"UPDATE NEWUSERDATA SET NEWUSERDATA.manager = SELECT CASE WHEN CURRENTUSERS.customproperty2 IS NOT NULL THEN CURRENTUSERS.username END FROM CURRENTUSERS WHERE NEWUSERDATA.customproperty3 = CURRENTUSERS.customproperty2"
]
}
If this helps your questions, please consider selecting Accept As Solution and hit Kudos