Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

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

sangitaladi
Regular Contributor
Regular Contributor

 

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 you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

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
Valued Contributor
Valued Contributor

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