BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I started out doing my work against a 5mb data table. The data table has 136 columns and around 13,000 rows.

I start off by pulling out my primary key columns(projectid, lineid, personid) and 3 data columns plus I added 3 columns that hold the length of each field in the 3 data columns. My new data table is now 9mb. Then I do all my cleaning and i'm at 12mb. When I try the code below to add my 7 new columns with the original table into a new table it is 620mb.

When I do this

proc sql;
create table CD_Data
as
Select OD.*, SSN.BM, SSN.BD, SSN.BY, SSN.DM, SSN.DD, SSN.DY, SSN.SSN
From OD_Data OD inner join SSN_DATA SSN on OD.projectid = SSN.projectid and OD.lineid = SSN.lineid and OD.personid = SSN.personid;
quit;

I'm not sure how adding 7 text columns will be that much space? 6 of those columns are completely filled. So I run a seperate data step clearing out the default values so they are blank and the data file was still around 600mb.

I've never looked at this aspect of sas so I would appreciate any help.

Thank You
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Analyze your SAS output data library / member with PROC CONTENTS to verify the SAS variables captured, their type and lengths and the overall size and content of your SAS database.

Scott Barry
SBBWorks, Inc.
deleted_user
Not applicable
Scott,
Thanks for the answer that is exactly what my issue was. I was not compressing the data so I creating another data set after my proc sql. This time is put data test (Compress=CHAR) that is what the original table had as it's compression. I ran that and now it's around 6mb.


Thank You
Jerry

sas-innovate-2024.png

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.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 2 replies
  • 563 views
  • 0 likes
  • 2 in conversation