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.
Hi SAS Optimization Community,
I’m presenting a live “Ask the Expert” webinar on May 23 rd , 11 AM – 12 PM ET entitled What’s New in SAS Optimization? I’ll show you how SAS Optimization continues to improve on its powerful modeling language with unified access to a broad suite of solvers. Bring your questions. We’ll host a live Q&A session at the end of the webinar.
You will learn about:
All the ways SAS Optimization is changing.
Recently added features, including a conic optimization solver and an automated Benders decomposition algorithm.
SAS Optimization performance improvements.
Reserve your spot for the webinar.
Want more tips? Be sure to subscribe to the Ask the Expert board to receive follow up Q&A, slides and recordings from this and other SAS Ask the Expert webinars.
Can't join the live event? You can view this and other Ask the Expert sessions on-demand here.
... View more
Can you tell me what is wrong with this code?
*OTHER NEUROLOGICAL DISEASES; array xx $ icdx1 icdx2 icdx3; label ond="Oth neurological"; ond=0; do over xx; if xx in: ("B90", "D48", "G04", "G09", "G10", "G11", "G12", "G13", "G24", "G25", "G26", "G32", "G37", "G51", "G52", "G53", "G70", "G71", "G72", "G73", "G80", "G81", "G82", "G83", "G90", "G91", "G93", "G95", "G99", "M47", "Q00", "Q01", "Q02", "Q03", "Q04", "Q05", "Q06", "Q07", "Q76") then ond = 1; *Doing exclusions in this way does not work; if xx in: ("G130", "G131", "G251", "G254", "G256", "G510", "G732", "G733", "G734", "G838") then ond=0; end;
The first part works fine. But then when I add in the line of code under *Doing exclusions in this way does not work; I get the following error messages:
*Doing the exclusions in this way does not work; 509 if xx in: ("G130", "G131", "G251", "G254", "G256", "G510", "G732", _ 22 202 509 ! "G733", "G734", "G838") then ond=0; ERROR 22-322: Syntax error, expecting one of the following: a quoted string, a numeric constant, a datetime constant, a missing value, iterator, (.
ERROR 202-322: The option or parameter is not recognized and will be ignored.
510 end;
Please help! Thanks!
... View more
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