- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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".
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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".
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you! This helped me understand the concept much better.