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

Use Case

We have a requirement to generate a random three-letter system username while excluding the following keywords: 'ADD', 'ALL', 'AND', 'ANY', 'ASC', 'END', etc

Pre-requisites

N/A

Applicable Version(s)

202x and 3.x

Solution

This use case can be achieved using inline processing by configuring the below query in the MODIFYUSERDATAJSON at the user import source (Connected Application, Schema Import, CSV Import)
 
#MODIFYUSERDATAJSON:
{ "ADDITIONALTABLES" : { "USERS" : "SELECT USERKEY,USERNAME,EMPLOYEEID,SYSTEMUSERNAME FROM USERS" }, "COMPUTEDCOLUMNS" : [ "OWNER","STATUSKEY","STARTDATE","MANAGER","SYSTEMUSERNAME","CUSTOMPROPERTY3","DISPLAYNAME"], "PREPROCESSQUERIES" : [

"UPDATE NEWUSERDATA SET SYSTEMUSERNAME = (SELECT random_word FROM (SELECT SUBSTRING(CONCAT(CHAR(FLOOR(RAND() * 26) + 65),CHAR(FLOOR(RAND() * 26) + 65),CHAR(FLOOR(RAND() * 26) + 65)), 1, 3) AS random_word) AS derived_table WHERE random_word NOT IN ('ADD', 'ALL', 'AND', 'ANY', 'ASC', 'END'))"]}

Attaching the recording using the CSV upload for reference
 
Version history
Last update:
‎03/16/2023 10:40 AM
Updated by:
Contributors