I'm extracting fields from different databases (DB2, Teradata..)/tables as shown in the image below and now I'm not certain to join all those variables to create a one single SAS dataset. Appreciate if someone of you guide me here.
E.g. Assume I'm extracting field A from table X, field B from table Y and field C from table Z and now I want to create a table XYZ which should have the variables A, B and C
You've got the following questions to answer first:
1. What's the logic?
- relationships between the tables
- Join logic
2. Performance
- How can you reduce volumes most efficiently on the data base side before pulling the data into SAS for further processing (joining the tables).
Only when you're really clear about what needs to be done start with implementation using DIS.
proc sql;
create table xyz as select x.a, y.b, z.c from
x left join y on ..... left join z on ..... ;
quit;
Since you didn't specify the joining criteria, I have left those as ......
You've got the following questions to answer first:
1. What's the logic?
- relationships between the tables
- Join logic
2. Performance
- How can you reduce volumes most efficiently on the data base side before pulling the data into SAS for further processing (joining the tables).
Only when you're really clear about what needs to be done start with implementation using DIS.
@Babloo wrote:
If there is a relationship between the tables, can I also lookup
transformation instead of Join transformation?
These are questions you have to answer, by learning about the databases involved.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.