Hello,
I am trying to initiate a batch program run using the sas-viya CLI. Our POC environment has been integrated with OAuthv2 and LDAP (SSO). To run the program, I first ran the auth login command to generate a token and then tried submitting the program as follows. It gives me an error and the program does not get submitted. Has anyone encountered this error?
Batch plugin version: sas-batch-cli-40.2.13-20250307.1741305600
AUTH plugin version: 1.29.3
SAS Viya release: 20250211
./sas-viya auth login
Enter credentials for https://viya-poc.mycompany.com:
Userid> johndoe
Password> Login succeeded. Token saved.
./sas-viya batch jobs submit-pgm --context default --pgm-path /home/johndoe/test.sas
Failed to create the file set.
The request was not performed because of the following internal error: Folders.CreateFolder: parentURI must not be empty
Hey!
Thanks for the quick response. For some reason I am unable to find 'sas-folders' deployment in my K8s cluster. I searched for the directory under sas-bases/base/components and I couldn't find it there either.
sas-folders and sas-types are now merged into the sas-file-store service/pod.
My response was deleted?! I redacted information now .
{"level":"error","version":1,"source":"sas-batch","messageKey":"0xc000e7a5d0 The error returned by models/apis.getUsersAppDataFolderURI was caused by the following error: statusCode=404, errorCode=11500, message=No folder with the ID of \"\" was found., details=[path: /folders/folders/@appDataFolder correlator:]","properties":{"logger":"service/batch/api/folders","req":"POST /batch/fileSets","tenant":"provider","caller":"logs/logs.go:117"},"timeStamp":"2025-04-07T19:33:12.054866+00:00","message":"0xc000e7a5d0 The error returned by models/apis.getUsersAppDataFolderURI was caused by the following error: statusCode=404, errorCode=11500, message=No folder with the ID of \"\" was found., details=[path: /folders/folders/@appDataFolder }
Yes it does. As I pointed out in my initial query, we use OAuth. Does batch submission require a different method to authenticate if using OAuth (auth token for instance)?
Wow!
This worked. Thank you so much!
I have a mixed feeling about using this method for batch submissions as we used to have wrapper scripts for running batch programs in SAS 9.x We would simply ask users to append their programs with the wrapper script and internally it would execute the sas_en binary along with relevant parameters (queue name, Rlang option etc.). With SAS viya CLI, the process is now more complicated , as we'd have to generate the auth code by doing a SSO login on the browser, then come back and paste the code. I searched the community but I am not able to find an article that has steps to automate batch execution.
But thank you so much for your input. Appreciate it.
Look in the sas-batch-<hash> pod logs to see if there is a more detailed error.
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.