Following up on my last post about the file types and platforms supported for loading in SAS Viya 3.5, here is the equivalent for saving. It basically answers the question: where and in which format can I save a CAS table among the SAS Viya “Platform Data Sources”? Here is the corresponding table:
Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.
As mentioned in my previous post, Azure Data Lake Storage (ADLS) is a new Platform Data Source option. Thus, we can save a CAS table to an ADLS Gen 2 directory as either a CSV file or an Apache ORC file (columnar storage). Saving to these formats on ADLS is serial only. Example of an ADLS CASLIB:
caslib myadls datasource=(
srctype="adls"
accountname='myaccount'
filesystem="myfs"
dnsSuffix=dfs.core.windows.net
timeout=50000
tenantid="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
applicationId="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
)
path="/mydata"
subdirs ;
In addition to Apache ORC, a new file format came up in Viya 3.5: the very popular Parquet column-oriented storage format. You can save a CAS table as a Parquet file in a local folder (PATH), a network folder (DNFS) or in AWS S3. The save operation is parallel on DNFS and S3.
Apache ORC and Parquet are supported in SAS Viya 3.5 deployed on Linux (not Windows).
To save a CAS table as a Parquet or an ORC file format, you just have to set the right file extension as you would do for SASHDAT or CSV format:
proc casutil incaslib="export" outcaslib="export" ;
save casdata="customers" casout="customers.sashdat" ;
save casdata="customers" casout="customers.parquet" ;
save casdata="customers" casout="customers.orc" ;
quit ;
“Others” represent DTA (Stata), XLS, XLSX files. They require the SAS Data Connector to PC Files.
Thanks for reading.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.