Production issue: User data record issue

Kanna12
Tera Expert

Hello EVery one,

 

I have production issue. We are getting user data from different organization and including user termination data.

I ran data source to get data and trasformed into users table in Servicenow.
When i ran data source, it fetched all user record (duplicate record ) and take the termination date record and updated into user table. we have code who have termination date, those user are marked as inactive.

It effecting active users aswell. My code not taking latest record of the user. It is taking user termination user record and latest record.

 

Please advise me here. I want to take user latest record not termination date record.

 

Is there anything that i need to do or put filter in trasform map to take latest date.

 

 

Please advise me here!

2 REPLIES 2

SanjivMeher
Kilo Patron
Kilo Patron

Can you post your code here so that we can review?


Please mark this response as correct or helpful if it assisted you with your question.

Data source SQL:

select distinct
ACTIVE_IND,
ID,
FIRST_NAME,
LAST_NAME,
CREATE_DT,
ROW_NUMBER() over (PARTITION BY ID ORDER BY UPDATE_DT desc)

from HISTORY_FCT
where
(ACTIVE_IND='Y')

 

It fetch all records of user data  and take termination user record and maped into users table.
I want to take latest user record and termination user record.