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

Inline preprocessor query is unable to compute owner while running full AD user import

sangitaladi
Regular Contributor II
Regular Contributor II

 

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

3 REPLIES 3

rushikeshvartak
All-Star
All-Star

{
"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)"
]
}


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Saathvik
All-Star
All-Star

@sangitaladi : What are you storing in CP2 and CP3?


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

PremMahadikar
All-Star
All-Star

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