We have a SAS dataset. Need to create a table in yellowbrick database with the same structure of SAS dataset without data. Is there a way to create such a table from sas dataset
Asked
Active
Viewed 402 times
1 Answers
0
It looks like YellowBrick uses a standard CREATE TABLE statement, so you can have SAS generate that for your table and use it in Yellow Brick.
Use the DESCRIBE command to get the mostly correct code.
Here's an example:
proc sql;
describe table sashelp.class;
quit;
Then go in the log file and get the code. You'll need to modify some things, such as the libname and the label/bufsize but it should be pretty straight forward. You'll want to change the types to match Yellow Brick formats. If you're doing this regularly it may be worth either connecting to the DB and then just cloning the table structure or automating the type conversion using some logic/rules.
create table SASHELP.CLASS( label='Student Data' bufsize=65536 )
(
Name char(8),
Sex char(1),
Age num,
Height num,
Weight num
);
quit;

Reeza
- 20,510
- 4
- 21
- 38
-
Hello Reeza, We need to automate the creation of table instead of giving the columns manually. Kindly let me know if we have a way for this? – Hari Prasath Oct 31 '19 at 04:04
-
Yes there are ways. – Reeza Oct 31 '19 at 14:57