I am using SAS Data Integration Studio and for my jobs with SCD Type 2 loader, I want my VALID END DTTM to be 1 sec before the next VALID START DTTM.
Example as below:
ID Name VALID_START_DTTM VALID_END_DTTM
1 BEN 01JAN2011:00:00:00 01JAN5999:00:00:00
Ben changed his name to Ali. Therefore, we will expire his name and append a new record as below (This is what I want to achieve)
ID Name VALID_START_DTTM VALID_END_DTTM
1 BEN 01JAN2011:00:00:00 31JAN2011:23:59:59
1 ALI 01FEB2011:00:00:00 01JAN5999:00:00:00
As we can see, VALID_START_DTTM of ALI is just 1 sec after BEN's VALID_END_DTTM. This is what i want to achieve.
The default SCD Type 2 Loader in SAS DI Studio will set VALID_START_DTTM of ALI and BEN's VALID_END_DTTM to be at the same exact datetime when the previous/existing record expires.
Example for the existing type 2 loader(that i do not want)
ID Name VALID_START_DTTM VALID_END_DTTM
1 BEN 01JAN2011:00:00:00 01FEB2011:00:00:00
1 ALI 01FEB2011:00:00:00 01JAN5999:00:00:00
Is there anyway to do so?
That's not configurable. You can't change it.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.