Creating an AI Assistant for SAS Viya in 5 steps (@sassoftware/viya-assistantjs) - Part I
Recent Library Articles
Recently in the SAS Community Library: SAS' @kumardeva debunks the myth that developing AI assistants is too hard. He shows you how to use the @sassoftware/viya-assistantjs library to jump start your development.
SAS Viya Workbench is coming! Built for developers and modelers, Viya Workbench is a self-service, on-demand compute environment for analytical development, including building AI and machine learning models. We're excited about the release next month and are dedicating the June edition of the SAS Bowl to it.
Game Details
The SAS Support Community trivia event, SAS Bowl XLI, SAS Viya Workbench is scheduled for Wednesday, June 12, at 10 a.m. ET.
Register for the event and receive an invite to a Microsoft Teams meeting and a calendar event.
On game day, join the Teams meeting and access the game here.
More on SAS Viya Workbench
Build powerful models quickly and efficiently through the code-based environment. An intuitive user interface and integrations with your favorite IDEs get up up and running in minutes. Streamline your work by pulling in existing Python or SAS projects - with minimal to no code modifications needed. Boost your productivity and performance by customizing your CPU/GPU compute power to fit the needs of your project. Develop on-demand with self-provisioning and self-terminating features requiring minimal IT support. Workbench allows you to focus on creating, innovating, iterating, and testing your work through a code-based interface using Juypter Notebooks and Visual Studio Code.
Here are some resources where you can learn more and get familiar with SAS Viya Workbench.
SAS Viya Workbench home page
Press Release announcing SAS Viya Workbench
Ask the Expert Webinar on SAS Viya Workbench
SAS Viya Workbench: The Final Countdown to Launch
SAS Bowl and event details
For those who may be new to the SAS Bowl, you can find game history and specifics in this Community memo. There you'll also find links to previous events, which include recordings.
Register for the event and receive an invite with game details and a Teams meeting link. On game day, Join the TEAMS meeting to play, and show off your SAS and worldly knowledge while competing for bragging rights and SAS Community game gear.
... View more
Hello, I am trying to BULKLOAD a SAS dataset into Snowflake and I am having trouble with the DATETIME column in my SAS dataset. When trying to load it into Snowflake, I get the error message: ERROR: Error executing COPY command: Numeric value '2016-01-08 14:20:34.000000000' is not recognized File '@~/nucleus/xxxxx.gz', line 6187, character 186 Row 6187, column " CLR_CALL_ACTIV_HIST_2016 "["INTERACTION-ID":21] If you would like to continue loading when an error is encountered, use other values such as 'SKIP_FILE' or 'CONTINUE' for the ON_ERROR option. For more information on loading options, please run 'info loading_data' in a SQL client. For reference, here is my SAS code: /* Transform the data */
DATA WORK.CLR_CALL_ACTIV_HIST_2016_0;
/* Load in work table containing the pre-transformed file */
SET WORK.CLR_CALL_ACTIV_HIST_2016_0;
/* Transformations */
'CHANNEL-ID-NUM'N = INPUT(STRIP('CHANNEL-ID'N), BEST32.);
IF MISSING('CHANNEL-OBJ-ID'N) OR UPCASE('CHANNEL-OBJ-ID'N) = "N/A" THEN
'CHANNEL-OBJ-ID-NUM'N = .;
ELSE
'CHANNEL-OBJ-ID-NUM'N = INPUT(STRIP('CHANNEL-OBJ-ID'N), BEST32.);
'GROUP-ID-NUM'N = INPUT(STRIP('GROUP-ID'N), BEST32.);
'INTERACTION-ID-NUM'N = INPUT(STRIP('INTERACTION-ID'N), BEST32.);
'DATE'N = INPUT(SUBSTR('TRANS-ACCEPT-TIME'N, 1, 10), YYMMDD10.);
FORMAT 'DATE'N YYMMDD10.;
'TIME'N = INPUT(SUBSTR('TRANS-ACCEPT-TIME'N, 12, 8), TIME8.);
FORMAT 'TIME'N TIME8.;
'DATETIME'N = DHMS('DATE'N, HOUR('TIME'N), MINUTE('TIME'N), SECOND('TIME'N));
FORMAT 'DATETIME'N DATETIME20.;
'TRANS-POST-PROC-TIME-NUM'N = INPUT(STRIP('TRANS-POST-PROC-TIME'N), BEST32.);
'TRANS-PROC-TIME-NUM'N = INPUT(STRIP('TRANS-PROC-TIME'N), BEST32.);
'TRANS-REC-NUM-NUM'N = INPUT(STRIP('TRANS-REC-NUM'N), BEST32.);
'TRANS-TOTAL-TIME-NUM'N = INPUT(STRIP('TRANS-TOTAL-TIME'N), BEST32.);
'TRANSACTION-ID-NUM'N = INPUT(STRIP('TRANSACTION-ID'N), BEST32.);
RUN;
/* Drop columns */
DATA WORK.CLR_CALL_ACTIV_HIST_2016_1;
SET WORK.CLR_CALL_ACTIV_HIST_2016_0;
DROP 'CHANNEL-ID'N
'CHANNEL-OBJ-ID'N
'GROUP-ID'N
'INTERACTION-ID'N
'TRANS-ACCEPT-TIME'N
'DATE'N
'TIME'N
'TRANS-POST-PROC-TIME'N
'TRANS-PROC-TIME'N
'TRANS-REC-NUM'N
'TRANS-TOTAL-TIME'N
'TRANSACTION-ID'N
;
RUN;
/* Rename columns */
DATA WORK.CLR_CALL_ACTIV_HIST_2016_2;
SET WORK.CLR_CALL_ACTIV_HIST_2016_1;
RENAME 'CHANNEL-ID-NUM'N = 'CHANNEL-ID'n
'CHANNEL-OBJ-ID-NUM'N = 'CHANNEL-OBJ-ID'N
'GROUP-ID-NUM'N = 'GROUP-ID'N
'INTERACTION-ID-NUM'N = 'INTERACTION-ID'N
'DATETIME'N = 'TRANS-ACCEPT-TIME'N
'TRANS-POST-PROC-TIME-NUM'N = 'TRANS-POST-PROC-TIME'N
'TRANS-PROC-TIME-NUM'N = 'TRANS-PROC-TIME'N
'TRANS-REC-NUM-NUM'N = 'TRANS-REC-NUM'N
'TRANS-TOTAL-TIME-NUM'N = 'TRANS-TOTAL-TIME'N
'TRANSACTION-ID-NUM'N = 'TRANSACTION-ID'N
;
RUN;
/* Load final table */
DATA WORK.CLR_CALL_ACTIV_HIST_2016;
SET WORK.CLR_CALL_ACTIV_HIST_2016_2;
RUN; Here is my Snowflake connector code: libname NUC_LIB snow
SERVER = "xxxx"
USER = "xxxx"
PASSWORD = "xxxx"
DATABASE = "xxxx"
SCHEMA = "xxxx"
ROLE = "xxxx"
WAREHOUSE = "xxxx"
;
DATA NUC_LIB.CLR_CALL_ACTIV_HIST_2016
(
BULKLOAD = YES
BL_INTERNAL_STAGE = "user/nucleus"
BL_COMPRESS = YES
BL_DELETE_DATAFILE = YES
DBCOMMIT = 1000000
);
SET WORK.CLR_CALL_ACTIV_HIST_2016;
RUN; Essentially, I need the DATETIME columns from SAS to be DATETIME columns in Snowflake.
... View more
Hello In a typical SAS 9.x environment, users often create datasets etc. that can be permanently stored on a physical disk. (Local, shared etc.) Moving to SAS Viya 4 on AWS I am exploring the options where a user can get the same experience and store the data on some form of permanent storage disk. (Content server, database excluded). This could be a storage on AWS itself. Wondering if somebody can enlighten me about the options available.
... View more
Fala pessoal, tudo bem? Será que alguém poderia me ajudar ou me ensinar de como fazer, pois estou já há algumas horas nesse código. Estou usando o SAS Viya V.03.05. Eu tenho esse código que já conseguir meio que andar com ele: /* Realizar o Download do Arquivo GeoJSON do Github */
filename mapa temp;
proc http
url="https://raw.githubusercontent.com/tbrugz/geodata-br/master/geojson/geojs-32-mun.json"
method="GET"
out=mapa;
run;
/* Ler o Arquivo GeoJSON usando a Biblioteca JSON */
libname jsonlib json fileref=mapa;
/* Examinar a Estrutura do GeoJSON */
proc contents data=jsonlib._all_;
run; Até aqui, vai bem. O código cria as tabelas do GeoJSON separadas, porém, eu não faço ideia de como linkar isso em um mapa Polígono.. Eu também gostaria de uma ajuda para colocar isso no VA, qual tabela e o passo a passo de como eu poderia fazer.. Se possível é claro. https://prnt.sc/e2I_ecsENtu_
... View more
Hi everyone - a bit newer to SAS and running into a problem trying to adapt someone's older code. Essentially I have a character variable with responses, and am coding in skips to it. e.g. Add skip coded 777 into the open text variable OPENTEXT1 if responses are blank OPENTEXT1 has character responses maxing out at 161 characters, proc contents show format=161 informat=$161. Check responses with proc freq, all 777 and responses are normal Then I create a "label" using the proc format function with value to label the skip and keep responses proc format; value OPENTEXT '777'="Skip"; run; data dataset1; set dataset; format OPENTEXT $OPENTEXT. proc freq, this time 777 show "SKIP" but other responses truncated to 4 characters I checked proc contents, and it is still showing format and informat still remaining at the same length. Any help appreciated
... View more