BookmarkSubscribeRSS Feed
RamKumar
Fluorite | Level 6

Any possibilities to produce a SCD type 1 & SCD type 3 report in base\advanced SAS code? If so, I request you to provide me the outline.

Thanks!

4 REPLIES 4
RamKumar
Fluorite | Level 6

I was wondering for an response - Can someone shed some light on this?

Cynthia_sas
SAS Super FREQ

Hi:

  What do these reports look like? Are you actually asking about reports or about how to accomplish a special type of processing described by these terms?

  Obviously, SCD type 1, type2, etc. are some kind of special report and/or process and your lack of a response indicates that forum participants might not know what "SCD type 1" or "SCD type 3" reports look like. Or, if they know what they look like, then they don't have data to test with, since you did not provide any test data or a program that illustrates the code that you've tried.

  If you are asking about "slowly changing dimension" processes and possible reports, such as the type 1 example discussed here SCD Type 1,Slowly Changing Dimension Use,Example,Advantage,Disadvantage, then it appears that there is no standard report for type 1 and the "new" record simply replaces the "old/original" record and no history is kept. In that case, I assume a simple PROC PRINT for a "before" and a PROC PRINT for an "after" would be sufficient "reporting". If what you are asking is how to actually perform the update, that is a different question and is probably best answered by looking at descriptions of DATA step programs to do data set updates.

  Complicating your question and pertinent to the answer is whether the files involved are SAS datasets, relational data base tables (such as Oracle or DB2) and the permissions involved for updating the files.

  If you are NOT talking about Slowly Changing Dimensions, then you will need to elaborate on what you are asking about.

cynthia

RamKumar
Fluorite | Level 6

Ideally I used to perform SCD's (1,2 & 3) in DI Studio transformation. But I wish to understand how it can be accomplished in via SAS coding. Unfortunately I don't have data at the moment to share you though.

My source and target is SAS datasets. It would be fine if you can explain me with the sample data or just provide me the outline especially for SCD-3.

LinusH
Tourmaline | Level 20

Please don't cross-post in several forums. See my answers in .

About Type 3. Follow Patricks (and SCD Type 2 Loader transform generated code) guidelines for finding last valid record, and join with input data. You are probably looking at if/case assignment logic for moving old information to the "old columns" and placing up date information oin the current columns.

BTW, I rarely use Type 3 columns, especially not in conformed dimensions, never in a detail data store. Perhaps in some user specific information mart...?

Data never sleeps

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1389 views
  • 0 likes
  • 3 in conversation