/*datamodeling*/
libname dmd 'C:\Documents and Settings\mobileclub\Desktop\practice\library';
/*assign without constraints*/
proc sql;
create table dmd.dm1(pid num unique,
age num not null,gender num check(gender=1));
quit;
/*structure of the table*/
proc sql;
describe table dmd.dm1;
quit;
/*etl process*/
libname etl 'C:\Documents and Settings\mobileclub\Desktop\practice\library';
proc sql;
describe table etl.dm1;
quit;
/*extraction*/
proc import datafile='C:\Documents and Settings\mobileclub\Desktop\source\xls\constraints.xls'
out=demo dbms=excel replace;
sheet='sheet8$';
run;
/*transformation*/
data demo1;
set demo;
if gender='m' then g=1;
else g=2;
drop gender;
rename g=gender;
run;
/*loading*/
proc append base=dmd.dm1 data=demo1 force;
run;
No comments:
Post a Comment