Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/07/2024 06:08 AM
Hello,
we have created a transformation for manager and secondarymanager in MODIFYUSERDATAJSON, but manager is populated and secondarymanager not, although they have the same settings:
{
"ADDITIONALTABLES": {
"USERS": "SELECTmanager, secondaryManager FROM USERS"}
},
"COMPUTEDCOLUMNS": [
"manager",
"secondaryManager"
],
"PREPROCESSQUERIES": [
"UPDATE NEWUSERDATA NU SET NU.manager = CONCAT((NU.costcenter), NU.manager)",
"UPDATE NEWUSERDATA NU SET NU.secondaryManager= CONCAT((NU.costcenter), NU.secondaryManager)"
]
}
why it is so?
manager comes exactly like it should, but the secondary - not
08/07/2024 06:26 AM - edited 08/07/2024 06:36 AM
@userNM you have used brackets twice
try below
{
"ADDITIONALTABLES": {
"USERS": "SELECT USERNAME,MANAGER,SECONDARYMANAGER FROM USERS"
},
"COMPUTEDCOLUMNS": [
"MANAGER",
"SECONDARYMANAGER"
],
"PREPROCESSQUERIES": [
"UPDATE NEWUSERDATA as NU SET NU.MANAGER = CONCAT(NU.costcenter, NU.MANAGER)",
"UPDATE NEWUSERDATA as NU SET NU.SECONDARYMANAGER= CONCAT(NU.costcenter, NU.SECONDARYMANAGER)"
]
}
08/07/2024 07:11 AM
thank you, I tried this one, but still ...manager is populated, but secondary manager is not...
08/07/2024 08:04 AM
What is the error?
08/08/2024 01:55 AM
it just says:
SECONDARYMANAGER VARCHAR(255) DEFAULT NULL,
2024-08-08T10:31:36+02:00-ecm-worker--null-8n4t4--SECONDARYMANAGER VARCHAR(255) DEFAULT NULL,
2024-08-08T10:31:33+02:00-ecm-worker--null-8n4t4--SELECT username, manager, customer, costcenter, USERKEY, SECONDARYMANAGER FROM USERS
2024-08-08T10:31:32+02:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-3-8n4t4-DEBUG-userFieldsMetadata: username,secondaryemail,email,employeeType,employeeclass,customproperty18,customproperty13,city,companyname,customproperty12,street,costcenter,country,customproperty2,customproperty7,startdate,enddate,job_function,secondaryManager,customproperty9,customproperty21,employeeId,customproperty4,manager,phonenumber,lastname,customproperty23,customproperty8,customproperty11,departmentname,customproperty10,middlename,orgunitid,departmentnumber,displayname,customproperty22,customproperty19,customproperty20,customproperty16,customproperty5,secondaryPhone,title,customproperty1,firstname,customproperty17,customproperty15
2024-08-08T10:31:32+02:00-ecm-worker-services.ImportSAvDataUserService-quartzScheduler_Worker-3-8n4t4-DEBUG-ADDITIONALTABLES= [CUSTOMER:SELECT customername from customer, USERS:SELECT statuskey, username, manager, customer, costcenter, USERKEY, SECONDARYMANAGER FROM USERS]
2024-08-08T10:31:32+02:00-ecm-worker-services.ImportSAvDataUserService-quartzScheduler_Worker-3-8n4t4-DEBUG-COMPUTEDCOLUMNS= [USERNAME, STATUSKEY, costcenter, STATSUKEY, MANAGER, CUSTOMER, SECONDARYMANAGER, USERKEY]
2024-08-08T10:31:32+02:00-ecm-worker--null-8n4t4--"USERS": "SELECT statuskey, username, manager, costcenter, customer, USERKEY, SECONDARYMANAGER FROM USERS",
2024-08-08T10:31:32+02:00-ecm-worker--null-8n4t4--"SECONDARYMANAGER",
2024-08-08T10:31:32+02:00-ecm-worker--null-8n4t4--"UPDATE NEWUSERDATA NU SET NU.SECONDARYMANAGER= CONCAT(NU.costcenter, NU.secondaryManager)",
08/07/2024 06:55 AM
08/07/2024 07:19 AM
thank you but it is not really our case..
08/07/2024 08:49 AM
Hello @userNM ,
Can you try below once and confirm:
{
"ADDITIONALTABLES": {
"USERS": "SELECT USERKEY,manager, costcenter,secondaryManager FROM USERS"}
},
"COMPUTEDCOLUMNS": [
"manager",
"costcenter",
"secondaryManager"
],
"PREPROCESSQUERIES": [
"UPDATE NEWUSERDATA SET manager = CONCAT(costcenter, manager)",
"UPDATE NEWUSERDATA SET secondaryManager= CONCAT(costcenter,secondaryManager)"
]
}
Regards,
Rahul
Please accept this as solution & give kudos if it resolves your issue.
08/07/2024 11:00 AM
@userNM the combination data is available in user list , after concat what adding into in seconmager ?
08/07/2024 06:07 PM
secondaryManager Needs username as input not userkey
08/08/2024 02:00 AM - edited 08/08/2024 02:15 AM
with or without username and with or without userkey Secondary manager is not linked... for whatever reason..
and moreover, we see in the logs that it is coming in correct format but it is not linked with a user, although with the manger it is linked, although it is the same user as manager and as secondary manager....
08/08/2024 06:36 AM
Sample
Updated code. Below works for me!
{
"ADDITIONALTABLES": {
"USERS": "select OWNER, CUSTOMPROPERTY16, SECONDARYMANAGER, USERKEY, CUSTOMPROPERTY41, CUSTOMPROPERTY44, CUSTOMPROPERTY45, CUSTOMPROPERTY50, CUSTOMPROPERTY60, CUSTOMPROPERTY42, USERNAME, REGIONCODE FROM USERS"
},
"COMPUTEDCOLUMNS": [
"SECONDARYMANAGER"
],
"PREPROCESSQUERIES": [
"update NEWUSERDATA nu left join CURRENTUSERS cu on nu.CUSTOMPROPERTY16 = cu.CUSTOMPROPERTY16 set nu.SECONDARYMANAGER = case when cu.SECONDARYMANAGER is null and cu.REGIONCODE != 'Employee' then '56678789'else cu.SECONDARYMANAGER end"
]
}
Note: SECONDARYMANAGER will take username and not userkey
08/08/2024 07:22 AM
thank you, but it didn't work either.. I think there is with this secondarymanager... maybe some bag, nothing is coming in this field... Moreover when we try to do manually but the next import, it is automatically removed
08/08/2024 07:27 AM
Share logs
08/09/2024 02:27 AM
there is no errors or smth it is just:
SECONDARYMANAGER VARCHAR(255) DEFAULT NULL,
the same we have with
OWNERONTERMINATE VARCHAR(255) DEFAULT NULL
we added like:
"UPDATE NEWUSERDATA NU SET NU.OWNERONTERMINATE = NU.manager WHERE NU.OWNERONTERMINATE= -1",
but nothiing is working.... and what is strange that for the manager it finds the found userkey in the logs but for secondary manager not, although it is the same user for the test case....
08/09/2024 02:32 AM
Share logs and used configs
08/14/2024 02:31 AM - edited 08/14/2024 02:31 AM
does not matter how hard we try it is not populated at all...
we received an advise from support team that we need to do it the following way:
UPDATE NEWUSERDATA NU SET NU.secondaryManager = (select U.userkey FROM NEWUSERDATA NU JOIN USERS U ON U.username) = CONCAT(NU.costcenter, NU.secondaryManager);
but it didn't work out at all...
then we modified it
UPDATE NEWUSERDATA NU JOIN CURRENTUSERS U ON U.userkey = CONCAT(NU.costcenter, NU.secondaryManager)SET NU.secondaryManager = U.username
but it still didn't work out... so I don't know how else we can solve the problem... from my PoV seems like a bag...
08/14/2024 05:27 AM
UPDATE NEWUSERDATA NU SET NU.secondaryManager = (select U.username FROM NEWUSERDATA NU JOIN USERS U ON U.username) = CONCAT(NU.costcenter, NU.secondaryManager);
08/14/2024 06:42 AM
thank you very much but it is still not pulled to the secondary manager field:
08/14/2024 06:44 AM
UPDATE NEWUSERDATA NU SET NU.secondaryManager ='admin' where NU.USERNAME=1111;
try for 1 user