Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/13/2023 02:35 AM
Hello,
I am trying to use the property MODIFYUSERDATAJSON by Uploading Users using Schema Upload.
I set content of MODIFYUSERDATAJSON like this:
"COMPUTEDCOLUMNS":["termDate"],"PREPROCESSQUERIES":["UPDATE NEWUSERDATA SET termDate ='09.12.2021'"]
because I want to replace a date as the date has not the correct format in the hr file:
The format in the HR file: 2021-12-08 01:21:44.517000. This format is not correct for the termdate
Can you please help me to get this feature working ?
Thanks
09/13/2023 09:30 PM
Hello @WilliamD,
Can you please try to use date in yyyy-mm-dd format while setting it
For eg.
"COMPUTEDCOLUMNS":["termDate"],"PREPROCESSQUERIES":["UPDATE NEWUSERDATA SET termDate ='2021-12-09'"]
09/14/2023 01:55 AM
Hello sudeshjaiswal,
Thanks a lot for your answer,
Unfortunately, I still have the same error:
java.sql.BatchUpdateException: Data truncation: Data too long for column 'TERMDATE' at row 1
It is like the PREPROCESSQUERIES":["UPDATE NEWUSERDATA SET TERMDATE ='2021-12-09'"]} does not make any changes.
I attached the SAV file if it can help.
Regards
William
09/14/2023 01:56 AM
#USER_NOT_IN_FILE_ACTION=NOACTION #FILENAME=users #DELIMITER=, #SKIP_NUMBER_OF_LINES=1 #ZERODAYPROVISIONING=TRUE #userReconcillationField=UserName #GENERATESYSTEMUSERNAME=FALSE #GENERATEEMAIL=FALSE #EMAILTEMPLATE="Email Template Name" #CHECKRULES=TRUE #MODIFYUSERDATAJSON={"ADDITIONALTABLES":{"USERS":"SELECT USERNAME, ORGUNITID FROM USERS","ACTIVEIDENTITIES":"SELECT DISTINCT USERNAME FROM USERS U LEFT JOIN USER_ACCOUNTS UA ON UA.USERKEY = U.USERKEY LEFT JOIN ACCOUNT_ENTITLEMENTS1 AE ON UA.ACCOUNTKEY = AE.ACCOUNTKEY LEFT JOIN ENTITLEMENT_VALUES EV ON EV.ENTITLEMENT_VALUEKEY = AE.ENTITLEMENT_VALUEKEY LEFT JOIN ACCOUNTS A ON A.ACCOUNTKEY=UA.ACCOUNTKEY WHERE ((UPPER(EV.CUSTOMPROPERTY1) LIKE '%SWITZERLAND%' AND EV.STATUS=1 AND A.STATUS='1') OR UPPER(U.COUNTRY) = 'SWITZERLAND')"},"COMPUTEDCOLUMNS":["TERMDATE"],"PREPROCESSQUERIES":["UPDATE NEWUSERDATA SET TERMDATE ='2021-12-09'"]} CUSTOMPROPERTY18,USERNAME,FirstName,LastName,CUSTOMPROPERTY25,EMPLOYEETYPE,CUSTOMPROPERTY3,costcenter,EmployeeClass,enddate,startdate,CUSTOMPROPERTY13,Email,CUSTOMPROPERTY1,CUSTOMPROPERTY2,jobCode,jobdescription,Owner,orgunitid,CUSTOMPROPERTY9,CUSTOMPROPERTY11,CUSTOMPROPERTY12,City,Country,Region,TERMDATE
09/19/2023 03:16 AM
Hello @WilliamD,
Can you please remove the termdate from the sav file and only set it using PREPROCESSQUERY.
Thanks