Published on :
Data Access CREATION_INTERNE

Creating a Parquet Table in Google Cloud Storage

This code is also available in: Deutsch Español Français
The Google Cloud Storage key file is usually specified as a path, but it is possible to specify the entire key as a string. For the Parquet engine on Amazon S3 or Google Cloud Storage, the physical name can be empty. If not empty, it specifies a folder path within the bucket, without including the table name. It is important to note that in Google Cloud Storage, folders are an organizational concept and a visual aid, but they do not represent a directory hierarchy.
Data Analysis

Type : CREATION_INTERNE


The examples use SASHELP data.

1 Code Block
LIBNAME Statement / PROC COPY / PROC PRINT
Explanation :
This SAS code uses a LIBNAME statement to connect to a Google Cloud Storage bucket with the Parquet engine, specifying the storage platform, the bucket name, and the GCS key file path. Then, PROC COPY is used to create a Parquet table named 'baseball' in the 'mylib' library from the SASHELP.BASEBALL dataset. Finally, PROC PRINT displays the first three observations of the newly created Parquet table.
Copied!
1LIBNAME mylib parquet ""
2 storage_platform = "GCS"
3 storage_bucket_name = "my-bucket"
4 storage_gcs_key_file = "/user/myfiles/my-project-5123b3a258a1.json"
5 ;
6PROC COPY in=sashelp out=mylib;
7 select baseball;
8RUN;
9PROC PRINT DATA=mylib.baseball (obs=3);
10 var name team;
11RUN;
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


Related Documentation : Data Access

Sujet / Mot-cléLien vers la ressource
DOC FedSQL en/sampleCode/FEDSQL9D66