What is CAUSER library, how it works?

Now before, when we listed the tables in our CAUSER library, we got nothing from the listing, if you remember. But when we run the list of the tables now, we can see that the Employee table is indeed loaded up in CAS. And you can see the path to the folder associated with that CAS library. Now you can use PROC CONTENTS on that table too because CAUSER is also a CIGREF here on the SAS side. So we’ve looked at it from the CAS side using PROC CASUAL. Take a quick look at the same information on the SAS side using PROC CONTENTS. And you’ll see that we could access that data set either way from the CAS side or the SAS side. Now, let’s compare PROC UIL and PROC CONTENTS. Notice that the information that we get from PROC CASUAL is fairly extensive. And PROC CONTENTS generates the standard information.

Now, we’re not going to turn off the CAS session, but we can remove the employee table from our CAS library memory space with a DROP TABLE command. You see that it is no longer listed. And just for good measure, we can reload the Employees’ table into the CAS library and manipulate that table with a standard BASE SAS TOOL, PROC DELETE. Notice that either way we do it, using PROC CASUAL or standard SAS procedures, we can manipulate, access, and describe data on a CAS server from our SAS Session. Now, perhaps you want to load files from the client side that are not SAS data sets. And we could do that too. We use the load file equal version of the load statement. Don’t forget that in the file name, you’ll need to use a fully qualified path to the file in your local SAS session. And then you’re going to be required to specify the name of the table that you’re going to create. What about those external files that are stored in the CALEB data source? Things like Excel spreadsheets and text files. Well, you’ll also use a LOAD statement, but this one uses the CAS DATA equal option, indicating that the file can be found in the CASIO’s offline storage space. It’s not the active CASSIE.

You can specify in CASEIN to let us know which CASIO’s offline storage has the file you’re interested in. And, again, if you want to load that table into a memory space in a different CALEB, you can specify the OUT CALEB equals option. You can specify a table name that’s not the same as the data source name if you wish. And, of course, you can promote that table on load. By default, the name of the data source will be the same as the name of the table in the in-memory space. But the tables are not replaced by default. So if there’s a table existing already, you must specify replace or you’ll get an error. In a previous demo, we took a SAS data set from our SAS Session and loaded it up as a CAS table. This is kind of referred to as loading a client-side table into CAS. In this demo, we’re going to take a look at loading a file from the CAS’s local offline storage up into memory for processing.

The file we’re going to use is an Excel file. You’re going to see how easy it is to load of Excel file that has a CAS table. And once we’ve reassured ourselves that everything’s well with that table in our personal CAUSER library, we’ll promote that table into the public space so that others can access the data too. The CAUSER CASSIE offline storage space includes an Excel file named sale.XLS. We’ll go ahead and use PROC CASUAL to load that file up into CAUSER memory space as a table called SALESIANS. Then we’re going to take a quick content of that to see what the data looks like. And in our results, we can see that the columns came out pretty much as we’d expect. Notice that all the character columns have come out as ARCHER. Nice space-saving measure. And that this is a local scoped table. Currently, resides in our CAUSER library. Having satisfied ourselves that the data looks good, we would like to share this data with the rest of the people on this CAS Server. Now, there’s a CALEB out there named Public that contains a bunch of Global Scoped tables that remain in memory for others to use. What we’re going to do is promote the table from our CAUSER library to the Public CAS library using the same name. Now when we do this, the actual table is moved, if you.

It will appear in Public and no longer appear in CAUSER. Now, because I’ve already run this demo before, that table already exists in the Public library. And one of the attributes of a global table is that you can’t replace it. To replace the table in the Public library, I’m going to have to drop it first. Now you can see that the table has been replaced with a table that we used to have in our CAUSER CALEB. And just to verify that everything went as planned, we’ll make a list of the tables in both CAUSER and the Public library. From the output, we can see that in the Public CALEB, the SALESIANS table exists. But if we scroll back and look at the CAUSER CALEB, there are no longer any tables listed there. So when we promote a table from one CASSIE to another, the table is moved and then promoted to a global table. Now in this class, you’re using a virtual lab. You’ll be logging in as a student. This user ID is a data manager who has permission to load data into CAS and set access permissions for others.

You may need to identify which files are needed to be loaded, whether their client-side or server-side, determine the CAS library or libraries where the in-memory tables should be stored. Finally, you’ll want to take a look at the table scope and see whether the scope of the table should be local or global. After you have manipulated and processed the data, you may wish to say the modified data off to the offline storage. And if you do that, you may want to determine whether you want to save that data in its original format or SASH DAT that format for rapid parallel loading when needed again. So after processing the tables, we might want to save them. And we’ll show you how that’s done. Now, there’s a lot of tables loaded up in the memory space for this particular CALEB. And we may want to drop them from memory or want to know when they are dropped from memory automatically. If you have the CAS Server restarted, of course, all in-memory tables will be dropped from memory.

Leave a comment