Published on :

Connect to Snowflake via LIBNAME

This code is also available in: Deutsch Español Français
Attention : This code requires administrator privileges.
This code block uses the LIBNAME statement with the SASIOSNF engine (SAS©/ACCESS Interface to Snowflake) to create a SAS© library named 'snow'. This library allows access to tables and views stored in the specified Snowflake database. Connection parameters include the server ('saspartner.snowflakecomputing.com'), user ('mwahi'), password, schema ('HCDW'), database ('USERS_DB'), and warehouse ('USERS_WH'). Additional options such as 'dbcommit', 'autocommit', 'readbuff', and 'insertbuff' are configured to optimize transaction management and data transfer. This configuration is essential for data integration between SAS© Viya and Snowflake.
Data Analysis

Type : EXTERNE


The data originates from an external Snowflake database. The script configures access to this data source but does not manipulate internal SAS data or data from SASHELP.

1 Code Block
LIBNAME Statement
Explanation :
This block configures the LIBNAME 'snow' statement to connect to a Snowflake instance. It uses 'server', 'user', 'password', 'schema', 'database', and 'warehouse' parameters to specify Snowflake database connection details. Options 'dbcommit', 'autocommit', 'readbuff', and 'insertbuff' are set to control transaction commit behavior and read/write buffer sizes, thereby optimizing performance.
Copied!
1LIBNAME snow SASIOSNF
2 server = "saspartner.snowflakecomputing.com"
3 user = mwahi
4 password = TAM813fla
5 schema = HCDW
6 database = USERS_DB
7 warehouse = USERS_WH
8 dbcommit = 10000
9 autocommit = no
10 readbuff = 30000
11 insertbuff = 30000;
12RUN;
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.