From: jaheuk on
does someone has a simple sas program to process slowly changing
dimensions type2 ?
just the basic actions are sufficient:
1/ detect the delta: base history file vs daily file
2/ create new records for new data
3/ create new records for changed data and end-date the old records

PS.
i do NOT have DI Studio ;-)
it is for batch processing on mainframe!!

Regards,
Herman
From: Patrick on
Hi Herman

There won't be a general but simple sas program for SCD2 loading.
What might be possible is to create a "simple" custom program for SCD2
loading which is tailored for exactly your situation.

To give you some input on that you would have to provide some more
specific information, especially:
- are you getting daily full loads or deltas?
- are you getting close out records?
- if you're getting daily full loads: should just everything not in
the daily source file be expired?

- how do you store history?
- how do you want to expire?
- is there a generated key in the table? And if yes: Is it a retained
key or does every single record have it's own key? (I strongly
recommend a retained key or keeping bridge tables in synch will be a
lot of work!)

- are always all non-key variables under change control for SCD2? Or
is it possible that the change of some variables is irrelevant or only
SCD1 (which then would result in a hybrid loader and much more coding
work)?

- Your SAS Server is on the Mainframe? Are the target tables in a DB
(which one) or are these SAS files?

- how many tables for SCD2 loading are we talking about?

- what data volumes are we talking about?


HTH
Patrick
From: Patrick on
Hi Herman

Just to add to my previous email:

You best send us code which creates your target table (with some data
in it) as well as another table which represents the source to be
loaded (also with data in it).
Please do both as close to reality as possible (not all "data" columns
are needed, only a small subset of rows but source and target data
should "match").

This would help a lot to give you some code propositions which fit
your situation.

By the way:
DI Studio is a development tool. The generated code is normally run in
batch, for example on a Mainframe.
Not having SAS DI for developing ETL code - especially for SCD2
loading - is in my opinion more of a :-(

HTH
Patrick