The summary of ‘SAS Tutorial | CLI in SAS Viya’

This summary of the video was created by an AI. It might contain some inaccuracies.

00:00:0000:13:17

The video features Darrell, a technical training consultant at SAS, who provides a comprehensive tutorial on managing the SAS Viya environment using the SAS Viya Command Line Interface (CLI). Key themes include installation, setup, and practical usage of the CLI. Darrell guides viewers through downloading and installing the CLI and its necessary plug-ins, establishing connections to different SAS Viya environments (development, testing, production) via profiles, and authenticating with tokens.

The tutorial also covers using specific commands to manage users and groups within SAS Viya. For example, Darrell demonstrates logging in using a user account (Christine), listing users, creating a new group (Education), and adding a user (Lynn) to this group. He further discusses the setup of administrative tasks, such as creating and managing folders for these groups.

Additionally, scripting for automation is explored, including handling expired tokens, and safe practices for password management. Examples of scripts include those for creating groups, adding users, and parameterized folder creation. A specific script, `stopSessions.py`, is demonstrated for terminating user sessions, showcasing its parameters and practical applications.

Overall, the video emphasizes effective SAS Viya administration through CLI, highlighting steps for setup, user management, and automating routine tasks, while engaging viewers to explore more through provided resources and interactions.

00:00:00

In this part of the video, Darrell introduces himself as a technical training consultant at SAS, focusing on SAS administrators and their management of the SAS Viya environment using the SAS Viya CLI (Command Line Interface). He explains that the CLI communicates with the SAS Viya environment through REST APIs without requiring users to write REST API calls themselves. Darrell walks through the steps to install the SAS Viya CLI, including downloading it from the SAS support site, accepting the license, moving the downloaded files to a specific location, and setting up the necessary plug-ins for the CLI to function. He demonstrates this process using a Windows system and mentions that the CLI can also be managed from a Mac or Linux environment.

00:03:00

In this segment, the video details the process of setting up the SAS Viya Command Line Interface (CLI) with necessary plug-ins from the SAS repository. It explains the steps to download and install these plug-ins and how to verify their installation using specific commands. The segment also covers setting up a connection to the SAS Viya environment by creating a profile, where multiple profiles can be established for different environments (development, testing, and production). The example uses an endpoint URL for connection and sets the output type to JSON for readability. Additionally, it highlights the need for a valid token to interact with the environment, which is obtained using the SAS Viya CLI authentication command.

00:06:00

In this part of the video, the presenter logs into the system using a user account, Christine, and mentions that the login token is valid for 12 hours, suggesting the use of scripts for automated, repeatable processes. After successfully logging in, the presenter runs a command using the identities plug-in to list users in the SAS Viya environment and demonstrates output formats in JSON and text. Next, they demonstrate creating a group named “Education,” adding a user named Lynn to this group using the add-member command. Finally, the presenter discusses the administrative task of setting up folders in the SAS Viya content structure for the new group.

00:09:00

In this part of the video, the speaker discusses setting up scripts with pre-installed plug-ins, profile, and token. They walk through the workshop directory containing three scripts, highlighting a script for creating a group and adding a user to it. They emphasize the importance of handling expired tokens and caution against storing passwords in files. The next script demonstrated is for adding a folder, which is parameterized to be flexible with different folder names. After running this script, the creation of the “Education” folder is confirmed. The final script mentioned is a Python script for stopping sessions which can take different parameters, such as specifying a username.

00:12:00

In this segment, the video explains how to use the `stopSessions.py` script to terminate user sessions in SAS Viya. You can either terminate all sessions of a user with the `-u` parameter or specify a particular session ID. An example is given where the CLI path is set, and JSON output is specified. The CAS plugin is used to list sessions for a specified user. The presenter briefly shows the necessary lines of code and invites viewers to check additional links for more information and to engage via comments or questions.

Scroll to Top