01/18/2023 11:28 PM - edited 01/18/2023 11:45 PM
Use Case:
If user customproperty25 is updated through import then customproperty60 of that user should be updated as "transferred" , so I am using the User Pre-processor Config JSON during csv import as shown below and the preprocessor json I am using is the following, please suggest any changes so it works for the use case mentioned
Note- User's Customproperty25 is getting updated successfully but customproperty60 is not getting updated as "transferred":
{
"ADDITIONALTABLES": {
"USERS": "SELECT username,customproperty60,customproperty25 FROM USERS"
},
"COMPUTEDCOLUMNS": [
"username","customproperty60","customproperty25"
],
"PREPROCESSQUERIES": [
"UPDATE NEWUSERDATA LEFT JOIN CURRENTUSERS ON NEWUSERDATA.USERNAME=CURRENTUSERS.USERNAME SET NEWUSERDATA.CUSTOMPROPERTY60='Transferred' where CURRENTUSERS.CUSTOMPROPERTY25!=NEWUSERDATA.CUSTOMPROPERTY25"
]
}
Solved! Go to Solution.
01/19/2023 01:04 AM
I solved it with the following query -->
{
"ADDITIONALTABLES": {
"USERS": "SELECT username,customproperty60,customproperty25 FROM USERS"
},
"COMPUTEDCOLUMNS": [
"username","customproperty60","customproperty25"
],
"PREPROCESSQUERIES": [
"UPDATE NEWUSERDATA, CURRENTUSERS SET NEWUSERDATA.CUSTOMPROPERTY60='Transferred' where NEWUSERDATA.USERNAME=CURRENTUSERS.USERNAME and CURRENTUSERS.CUSTOMPROPERTY25!=NEWUSERDATA.CUSTOMPROPERTY25"
]
}