Published on :
ETL CREATION_INTERNE

Data Types

This code is also available in: Deutsch Español Français
Awaiting validation
The SAS© Viya 4 CAS server supports specific data types. CHARACTER (CHAR) and NUMERIC (DOUBLE) types are traditionally supported by SAS©. Newer types such as INT32, INT64, VARBINARY, and VARCHAR are also supported. The VARBINARY type is used for binary files (images, audio, documents). The VARCHAR type is distinguished by lengths in characters (rather than bytes) and variable width. INT32 and INT64 types offer greater numerical precision than the traditional NUMERIC type. When loading data, types not supported by CAS are automatically converted. Calculations on the CAS engine retain INT32/INT64 types, while those executed on the SAS© 9 engine convert these values to NUMERIC. The document presents a detailed table of data types supported by various components of the SAS© Viya platform (CAS Actions, CASL, Data Connectors, Procedures and DATA Step, DS2, FedSQL, and SAS© Compute Server). It also indicates that DS2 and FedSQL do not support the SAS© NUMERIC type but do support the DOUBLE type.
Data Analysis

Type : CREATION_INTERNE


Examples are not provided directly in the documentation. The documentation is descriptive, listing data types and their compatibility.

1 Code Block
DATA STEP Data
Explanation :
This example illustrates the creation of a CAS table with INT32 data types for 'id', VARCHAR(50) for 'name', and DOUBLE for 'value'. It uses a DATA step to create the table with inline data, then loads it into CAS. The PROC CAS procedure is then used to display table information, including column data types, to verify that the specified types are correctly applied on the CAS server.
Copied!
1/* Exemple hypothétique basé sur la documentation */
2/* La documentation ne fournit pas d'exemples directs, il s'agit d'une illustration */
3 
4DATA casuser.my_data;
5 LENGTH id int32 name varchar(50) value double;
6 INPUT id name $ value;
7 DATALINES;
81 John_Doe 123.45
92 Jane_Smith 67.89
10;
11RUN;
12 
13PROC CAS;
14 LOADACTIONSET "table";
15 TABLE.tableinfo RESULT=r / caslib="casuser" name="my_data";
16 PRINT r;
17QUIT;
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