The LIBNAME statement is used to establish a connection to a Google Cloud Storage bucket by specifying the 'parquet' engine, the 'GCS' storage platform, the bucket name, and the GCS key file path. The COPY procedure is then used to copy the 'sashelp.baseball' dataset to the defined LIBNAME library, thus creating a Parquet table in GCS. Finally, PROC PRINT is used to display the first three observations of the new Parquet table, demonstrating successful access to data stored on Google Cloud Storage.
Data Analysis
Type : CREATION_INTERNE
The example uses the internal SASHELP.BASEBALL dataset. The code provides the complete context for creating the Parquet table and displaying the data.
1 Code Block
LIBNAME / PROC COPY / PROC PRINT Data
Explanation : This code block first defines a SAS libname, 'mylib', using the 'parquet' engine to connect to a Google Cloud Storage bucket ('my-bucket'). It also specifies the path to the GCS key file for authentication. Then, PROC COPY is used to copy the internal SAS dataset 'sashelp.baseball' to this 'mylib' library, creating a Parquet table in GCS. Finally, PROC PRINT displays the first three observations of the newly created 'baseball' table in 'mylib', thereby verifying the creation and accessibility of the Parquet table.
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.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.