Can anyone help me with the syntax to load table to a caslib on startup using the casstartup_usermods.lua file in viya 3.5?
Thank you in advance!
Have a look at this article, https://communities.sas.com/t5/SAS-Communities-Library/tips-amp-tricks-for-writing-Lua-code-for-the-... published today. It will show you code examples on loading all files with a given name pattern as CAS tables. Search for "How to call CAS actions and process the result within a Lua program".
From SAS Help Center: SAS Cloud Analytic Services: Concepts
under the Understanding Configuragion Files and Start-up Files / Standard Configuration Files heading:
casstartup_usermods.lua |
This file contains modifications that are made by the SAS administrator to casstartup.lua, such as adding global-scope caslibs and loading global-scope tables. Using casstartup_usermods.lua ensures that your modifications are not overwritten when you upgrade CAS. CAS processes casstartup_usermods.lua before any of the other start-up files residing in the Use Lua syntax such as the following. Do not forget to use global scope.
|
Carl Sommer - SAS Technical Support
Hi Carl,
Thank you for the suggestion. I tried this (with the same syntax). Now the caslib is not visible anymore. If I create a new caslib, I get the below error:
The specified directory for caslib openbaar already exists.
Caslib openbaar already exists.
The action stopped due to errors.
code: 2-0-2640516
property: PERM_CL_EXISTS
uri: /casManagement/servers/cas-shared-default/caslibs
path: /SASDataExplorer/ui/datasources/validation
traceId: 3b375ad84becf405
Should I have done session=true instead of false? Do you know how I can make this caslib visible again?
Have a look at this article, https://communities.sas.com/t5/SAS-Communities-Library/tips-amp-tricks-for-writing-Lua-code-for-the-... published today. It will show you code examples on loading all files with a given name pattern as CAS tables. Search for "How to call CAS actions and process the result within a Lua program".
Thank you! This helped me understand the concept much better.
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.
Find more tutorials on the SAS Users YouTube channel.