proc casutil;
save
casdata="cleaned_data"
casout="cleaned_data.parquet";
run;
Getting errors. Suggestions greatly appreciated:
Hi,
SAS Studio is the interface you use to access SAS. The SAS Studio interface can be used with two SAS products- SAS 9.4 and SAS Viya. Online versions of both of these exist. SAS OnDemand for Academics runs SAS 9.4 software. SAS Viya for Learners | SAS runs SAS Viya software.
The PROC CASUTIL code you mentioned will not run in SAS 9.4 software. It will only run in SAS Viya.
In order to use SAS Viya for Learners, you need to be an academic faculty, student, or staff and have a SAS profile with an email address affiliated with an academic institution. Do you have that?
If not, it sounds like you have SAS 9.4 on your computer, but not SAS Viya. Unfortunately, this means the PROC CASUTIL code you mentioned is not going to run on your system.
LOL. No SAS Admins here...
So, in other words, no luck converting the SAS dataset through SAS Studio?
I wouldn't think accomplishing such a simple procedure would have restrictions.
Any suggestions to get around this, and accomplish it via the SAS site here??
Have you had any training at all on using Viya?
Here's a link to the CAS doc about starting a CAS session. I recommend you read up about getting started with Viya if you aren't sure of the steps. I've never used Viya myself but these pages look easy to follow.
And who set up your SAS environment in your organisation?
Uhh, me?
It wasn't hard simply signing up.
I generally use PC SAS 9.4.
On this one occasion I needed a .parquet file, and Python was having a hard time with the conversion. I discovered SAS Viya has the ability to convert to .parquet. So, this one time I thought I'd give it a try.
You refer to "SAS Studio Online" so I can only guess you are using SAS Viya for Learners. Is this correct? If so then the links I provided earlier should help you get started.
Well, when I tried out the suggestion, just got errors:
Seems more is needed.
I've moved your post here where users of SAS Viya for Learners are more likely to see it.
Hi,
SAS Studio is the interface you use to access SAS. The SAS Studio interface can be used with two SAS products- SAS 9.4 and SAS Viya. Online versions of both of these exist. SAS OnDemand for Academics runs SAS 9.4 software. SAS Viya for Learners | SAS runs SAS Viya software.
The PROC CASUTIL code you mentioned will not run in SAS 9.4 software. It will only run in SAS Viya.
In order to use SAS Viya for Learners, you need to be an academic faculty, student, or staff and have a SAS profile with an email address affiliated with an academic institution. Do you have that?
If not, it sounds like you have SAS 9.4 on your computer, but not SAS Viya. Unfortunately, this means the PROC CASUTIL code you mentioned is not going to run on your system.
Well, that would explain it. I'm just a regular person, more or less.
So, we don't have access to the advanced stuff, like converting a small SAS dataset to .parquet format.
Bummer.
Convert the SAS dataset to a CSV file
https://documentation.sas.com/doc/en/pgmsascdc/v_052/pgmgs/p14twtiyode7jhn18sqqmm68vccf.htm
and then use Python to make a parquet file.
https://robertochiosa.medium.com/a-python-guide-to-compress-csv-data-into-parquet-8c797136aa38
There are 'labels' included in the SAS dataset(s). These labels are way more descriptive of the columns than the short variable names I was forced into. I just hate losing these labels.
But, alas, we must, apparently. I don't know that .parquet even supports such labels anyway.
Was worth a try.
As always with a CSV file you should make a separate file that describes the variables since there is no place in the CSV file to store labels, or type, or length, or format, etc.
It is also not hard to make the CSV file using the labels as the column headers. But I have no idea how that would impact the usefulness of the parquet file to have descriptions instead of names for the variables.
Some of the 'labels' exceeded the length SAS allows as variable names. Thus, had to go the short-version route.
Very fortunately, SAS permits 'labels', and shows those in many procedures.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Ready to level-up your skills? Choose your own adventure.