Published on :
ETL TABLE_EXISTANTE_CAS

Export to CSV File

This code is also available in: Deutsch Español Français
The EXPORT procedure is used to convert a SAS© dataset, here 'mycaslib.creditqualify', into an external CSV file. The OUTFILE option specifies the path of the output file, DBMS defines the file type as CSV, and the REPLACE option allows overwriting the output file if it already exists. The source dataset is assumed to be a CAS table ('mycaslib.creditqualify'), indicating the use of the Cloud Analytic Services (CAS) environment.
Data Analysis

Type : TABLE_EXISTANTE_CAS


The example uses an existing SAS dataset named 'creditqualify' stored in the 'mycaslib' library, which is a CAS library. The code for creating this table is not provided in the documentation but is implicitly assumed to exist.

1 Code Block
PROC EXPORT
Explanation :
This code block uses the EXPORT procedure to export the CAS table 'mycaslib.creditqualify'. The OUTFILE option specifies the full path where the CSV file will be saved. The DBMS=csv option indicates that the output format should be a CSV file. The REPLACE option allows overwriting the 'CreditQualify.csv' file if it is already present in the specified directory. It is crucial to replace 'your-file-path' with a valid path on the system.
Copied!
1PROC EXPORT DATA=mycaslib.creditqualify
2 outfile="your-file-path\CreditQualify.csv"
3 dbms=csv
4 replace;
5RUN;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
Copyright Info : Copyright © SAS Institute Inc. All Rights Reserved


Banner
Expert Advice
Expert
Michael
Responsable de l'infrastructure Viya.
« The PROC EXPORT utility is the standard for bridging the gap between high-performance SAS environments and local file systems. When working with CAS tables (as indicated by the mycaslib prefix), it is important to understand that SAS must first move the distributed data from the CAS worker nodes back to the SAS Compute Server before generating the physical CSV file. »