Click HERE to see how Saviynt Intelligence is transforming the industry. |
04/12/2022 12:55 PM
Hi,
I'm testing user import preprocessor documented here https://saviynt.freshdesk.com/support/solutions/articles/43000556603-user-import-preprocessor, using a csv file with one user record.
My issue is that the user is not imported when providing the User Pre-processor Config JSON
. When I run the import, no user is created or updated.Let's say that I want to update customproperty2 with lastname+","+firstname as is described in the documentation. Should I provide only the ADDITIONALTABLES:
{ "ADDITIONALTABLES": { "USERS":"SELECT USERKEY FROM USERS", }, "COMPUTEDCOLUMNS":{ "customproperty2" }, "PREPROCESSQUERIES": [ "UPDATE NEWUSERDATA SET CUSTOMPROPERTY2 = CONCAT(lastname,",",firstname)", ] }
Or the whole configuration? And what does the first line with attribute names mean? Should I include all of the attributes in the import file in the first line of the configuration?
USERNAME,SYSTEMUSERNAME,FIRSTNAME,LASTNAME,STATUSKEY,EMAIL #USER_NOT_IN_FILE_ACTION=NOACTION #DELIMITER=, #SKIP_NUMBER_OF_LINES=1 #ZERODAYPROVISIONING=FALSE #CHECKRULES=FALSE #GENERATESYSTEMUSERNAME=FALSE #BUILDUSERMAP=FALSE #MODIFYUSERDATAJSON={ { "ADDITIONALTABLES": { "USERS":"SELECT USERKEY FROM USERS", }, "COMPUTEDCOLUMNS":{ "customproperty2" }, "PREPROCESSQUERIES": [ "UPDATE NEWUSERDATA SET CUSTOMPROPERTY2 = CONCAT(lastname,",",firstname)", ] } }
Solved! Go to Solution.
04/12/2022 01:53 PM
Hi Mikko,
Seems there was issue with json. Below is the updated json. Please ensure that for schema upload you add the json in one line as i have provided below.
Please let me know the version of application you are using.There was issue with schema uploads which was fixed later. You might require a patch. depend upon the version used, i cna help you.
{"ADDITIONALTABLES":{"USERS":"SELECT USERKEY FROM USERS"},"COMPUTEDCOLUMNS":["customproperty2"],"PREPROCESSQUERIES":["UPDATE NEWUSERDATA SET CUSTOMPROPERTY2 = CONCAT(lastname,",",firstname)"]}
Thanks
Ajay
04/12/2022 01:53 PM
Thanks for your answer. I tried with the JSON you provided, but still no success. This is the upload config.
Result:
I could check the logs, but there are currently some issues with the environment so they are not updated, so I am not able to check for any error messages. Version of the environment is 5.5.
04/12/2022 01:53 PM
Hi,
I need to know the version of the application used. Please share the sample csv file used and the logs. I would have a look and reply back.
Please check the config's i.e. is username manadtory for import?are you passing username in file?
Thanks
Ajay
04/12/2022 01:53 PM
Version of the application is 5.5. I do not have access to the logs as there are some issues with the logs not updating, I have opened a ticket for the log issue.
Username is passed in the file. If I don't provide any preprocessor JSON, the user is created successfully
sample file content:
username,"systemusername","firstname","lastname","Statuskey","email"
10000112,10000112,"John","Doe","1","john.doe@company123abc.com"
04/12/2022 01:53 PM
Ok, I got access to logs, seems that single quotes should be used in the concat. JSON below is working
{"ADDITIONALTABLES":{"USERS":"SELECT USERKEY FROM USERS"},"COMPUTEDCOLUMNS":["customproperty2"],"PREPROCESSQUERIES":["UPDATE NEWUSERDATA SET CUSTOMPROPERTY2 = CONCAT(lastname,' ',firstname)"]}