Production issue: User data record issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2024 08:45 AM
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!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2024 08:57 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2024 09:00 AM
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.