When you import data through the Manage Data visual interface, is there a way to save the code (similar to how we could save the code in the 9.4 import wizard)?
I need this because my attempts to import with code don't work but importing through the interface does work. This would help me know what I am doing wrong.
Unfortunately, there is not. If you are doing a local file import then the "code" is actually a set of REST calls to the SAS Viya microservices. The most important of these is a POST to the CAS Management service to stream the data to the CAS server to have the table created. Internally CAS Management is using the CAS Java client to invoke a table.upload CAS action.
If you are importing an unloaded table from a caslib, then the code for performing the import is contained in the corresponding Job Definition used to run the Import job. All of these job definitions are running CASL code, and they should be publicly viewable using the Job Definitions service REST API to retrieve them. The returned definition will have a "code" member that contains the parameterized CASL code block that it uses.
Unfortunately, there is not. If you are doing a local file import then the "code" is actually a set of REST calls to the SAS Viya microservices. The most important of these is a POST to the CAS Management service to stream the data to the CAS server to have the table created. Internally CAS Management is using the CAS Java client to invoke a table.upload CAS action.
If you are importing an unloaded table from a caslib, then the code for performing the import is contained in the corresponding Job Definition used to run the Import job. All of these job definitions are running CASL code, and they should be publicly viewable using the Job Definitions service REST API to retrieve them. The returned definition will have a "code" member that contains the parameterized CASL code block that it uses.
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 lock in 2025 pricing—just $495!
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.