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

Comparing existing user customproperty while import

rahulyadav
New Contributor
New Contributor

Hi Everyone,

We are trying to compare old values and the current value of present users customproperty 40 through a preprocessor query we want to update customproperty41 as 'updated' if customproperty40 gets updated while user import.

Please help us to achieve this use case

Thank you!

6 REPLIES 6

PremMahadikar
Valued Contributor
Valued Contributor

Hi @rahulyadav ,

Can you please try below preprocessor code:

{
    "ADDITIONALTABLES": {
        "USERS": "SELECT USERNAME,CUSTOMPROPERTY41,CUSTOMPROPERTY40 FROM USERS"
    },
    "COMPUTEDCOLUMNS": 
	[ 	"USERNAME",
		"CUSTOMPROPERTY41",
		"CUSTOMPROPERTY40"
	],
    "PREPROCESSQUERIES": [ "UPDATE NEWUSERDATA LEFT JOIN CURRENTUSERS ON NEWUSERDATA.USERNAME = CURRENTUSERS.USERNAME SET NEWUSERDATA.CUSTOMPROPERTY41 = case when (CURRENTUSERS.CUSTOMPROPERTY40 IS NOT NULL AND NEWUSERDATA.CUSTOMPROPERTY40 != CURRENTUSERS.CUSTOMPROPERTY40) THEN 'updated' END"
    ]
}

 

If you find the above response useful, Kindly Mark it as Accept As Solution and hit Kudos

I am getting this error, from the preprocessor query you have given.

rahulyadav_0-1713338134473.png

 

@rahulyadav ,

I tested this preprocessor query and is working fine.

This should be an error in your csv file.

Can you please check with limited columns and debug it. (You can also use UI for uploading user and debug it)

  1. Like, have username, statuskey, firstname,lastname,cp40,cp41 in .csv file.
  2. And use import from UI - Admin->Identity Repositity->Users->Upload User
  3. Add the preprocessor and import
  4. PremMahadikar_0-1713340692503.png

     

Can you share logs in file


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

rushikeshvartak
All-Star
All-Star

Which connector is used here ? 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

I am using File Import, also Workday RaaS connector