The SAS Viya for Learners (VFL) environment gives students access to current state-of-the-art analytics from SAS. The purpose of this post is to present a technique for importing a document collection while operating within the available permissions.
Documents for a SAS Visual Text Analytics project are input as rows from a single CAS table at the time project is created. The table is often manually prepared by the analyst, and this was the case for using document collections in VFL.
Until now.
Suppose instead that you accumulated individual documents for a project you need to work on in a folder on your local computer. The documents might be in various file formats such as pdf, word, txt or csv. You can use the approach in this post to let SAS Viya easily combine the folder contents into a single table on your Viya for Learners environment.
Every VFL user has their own CASUSER library. The CASUSER library will be used to stage documents for automatic uploading into a CAS table.
SAS Visual Text Analytics "Docu-Load" process
Procedure for uploading multiple documents on Viya for Learners.
(11/19/2025 version 4: please forward updates to Peter.Christie@sas.com)
Purpose:
Use this 4-step procedure to upload documents from a folder on your local computer and create a table (.sashdat file) in your CASUSER library on VFL to use as input for a new Text Analytics project.
Note: Individual files must be < 100mb to get uploaded in VFL, but the total document collection size can be up to 5G.
Preparation steps:
Start with an empty CASUSER folder. This will prevent unwanted documents from accidentally being included for analysis in your new text analytics project.
1) Backup then remove all existing files from CASUSER
Result: CASUSER is empty. All files have been (temporarily) moved to folder: Backup.
2) Upload new documents into CASUSER
Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.
Result: CASUSER has all the new individual documents.
3) Create a new document collection for your new text analytics project.
4) Post-processing
After creating the AgDocs document collection, you can 'clean up' and delete all individual document files that were copied into your CASUSER folder except for the AgDocs.sashdat table. You can now move everything from the backup folder location (Step1) back to CASUSER.
Result: CASUSER contains everything it had before, plus an additional AgDocs table.
NOTE 1: This technique will process all documents in CASUSER at the time you run the import. Prior to doing the import, make sure to move or delete any unwanted files from CASUSER that you do not want in the new document collection. Also note that SAS datasets or SAS programs that are in CASUSER at the time of import will not be uploaded.
NOTE 2: The .sashdat table that is created after you upload the documents will remain in Viya until you delete it. It is ok to delete the original documents from CASUSER after the upload completes successfully, but do not delete the new sashdat table that was created in section 3.
NOTE 3: you can select the file type(s) at upload time. For example, if you have “pdf” and “txt” files in CASUSER but only need the “txt” files for your VTA project, you do not have to remove the pdf files from CASUSER. Just make sure you specify the filetype “txt” in step 3 under Create a new document collection before you run the upload.
NOTE 4: for document collections that are already in a SAS dataset or in a single csv file, use the Manage Data application to upload the file.
I want to extend a special thanks to everyone at North Carolina A&T State University who tested this process! I hope it helps you to conveniently add document collections for analysis in your Text Analytics projects.
Thanks for reading!
Find more articles from SAS Global Enablement and Learning here.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.