Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Export a LASR Table

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

Export a LASR Table

So i've always wondered, is there a way to export a table that's been loaded into the LASR Server into say a .sas7bdat file?

Reason why is we're running a VA server for teaching purposes and teachers have created tables within the VA application and loaded tables which they use for future classes.

Lets say they first give me a table to load, lets call this Week1.sas7bdat and Data.sas7bdat

So i'll SFTP into the server where VA is running, put it in the Autoload folder. Let autoload run, confirm table is there etc.

 

Teacher uses Week1 table and Data table in Data Preperation and creates a data query which uses both of those tables and outputs a new table into the LASR Server called Week2.

 

Week 2 is then used the next week in the class to teach.

 

So the issue i have now is i have Week1 and Data on hand in case something happens, but i don't have the Week2 table. This means that the teacher will then have re-do all that work to create Week2, or if he leaves im stuck with Week2 still on the LASR Server with no way of recovering that table if something happens.

 

So the question is, how does one export that Week2 table to a sas7bdat file so i can re-load it back in if need be.

I've tried exporting it as a package with the option "Include/replace physical table" but during the export it errors out with

 

WARN  - Content for table, "CustomerOrdersz3030967 (LASRLIB.Week1)", does not exist.
ERROR - Physical file does not exist, /saswork/SAS_work2C3E000072B3_server001/#LN00011.
ERROR - Creating package file for table "Week1 (LASRLIB.Week1)".

 

System details:

SAS Visual Analytics 7.3 M3

SAS 9.4 M3

Red Hat Enterprise 6.9 64bit


Accepted Solutions
Solution
Friday
SAS Super FREQ
Posts: 548

Re: Export a LASR Table

Posted in reply to Steven997

@Steven997,

 

Here is a simple exporting example that you can run in SAS Studio:

 

LIBNAME LASRLIB SASIOLA  TAG=VAPUBLIC  PORT=10031 HOST="<LASR_HEAD_NODE_FQDN>"  SIGNER="<MIDDLE_TIER_URL>/SASLASRAuthorization" ;
LIBNAME DST '/path/to/the/folder/';

data dst.cars;
set lasrlib.cars;
run;

View solution in original post


All Replies
Solution
Friday
SAS Super FREQ
Posts: 548

Re: Export a LASR Table

Posted in reply to Steven997

@Steven997,

 

Here is a simple exporting example that you can run in SAS Studio:

 

LIBNAME LASRLIB SASIOLA  TAG=VAPUBLIC  PORT=10031 HOST="<LASR_HEAD_NODE_FQDN>"  SIGNER="<MIDDLE_TIER_URL>/SASLASRAuthorization" ;
LIBNAME DST '/path/to/the/folder/';

data dst.cars;
set lasrlib.cars;
run;
New Contributor
Posts: 4

Re: Export a LASR Table

[ Edited ]

Thanks Alex, I'll give that a go today.

 

Update: Ok i gave that code a go and it seems to only work for loaded tables. Is there a way to somehow export tables that aren't currently loaded in LASR Server ? or am i to assume when it's unloaded, even if it's listed in LASR Server it's not there?

The issue we have is the current teacher that originally loaded week 2 no longer teaches and we're stuck with a unloaded table that is needed for class.

 

Occasional Contributor
Posts: 16

Re: Export a LASR Table

Posted in reply to Steven997

You can also in the Data Builder query output the table as regular sas table (in the autoload folder), and then create a second query that loads the table to memory using the same name. You will then both have a backup, and the table will be autoloaded if the server is restarted.

New Contributor
Posts: 4

Re: Export a LASR Table

The issue with that is i still don't have a physical copy of the table.

Correct me if im wrong but your solution will still leave the table loaded in memory in the metadata.

 

 

SAS Super FREQ
Posts: 548

Re: Export a LASR Table

Posted in reply to Steven997

@Steven997,

Is there a way to somehow export tables that aren't currently loaded in LASR Server ?

No.

or am i to assume when it's unloaded, even if it's listed in LASR Server it's not there?

What you see in the list isn't actual tables. Those are metadata entries for tables in memory. Those tables can be loaded or unloaded. proc metalib will synchronize the state once the table will be reloaded in VA.

Correct me if im wrong but your solution will still leave the table loaded in memory in the metadata.

Tables loaded to the memory on LASR server, not metadata.

Occasional Contributor
Posts: 16

Re: Export a LASR Table

Posted in reply to Steven997

Yes, you would have a physical copy of the LASR table stored as a permanent SAS table in the autoload folder. In the Data Builder your output table (from your query) can be a regular sas table using a base library (pointing to the autaload folder if you prefer). Then the second qurey actually loads this table to memroy. Like I said you have to have make two queries, with two different output tables - one sas table and one lasr table.

New Contributor
Posts: 4

Re: Export a LASR Table

Posted in reply to Steven997

Thanks for the input fellas. It seems this table is pretty much a lost cause as I've been told by the current teacher that the table we're after is being created by a Query.

Though i did have a look at the table in SASMC and the current teacher seems to know how to remake that table based on the columns i provided so we're back on track.

 

Alex: your solution would also prevent this issue arrising in the future as i have now exported loaded tables that were also created by the current teacher.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 7 replies
  • 110 views
  • 0 likes
  • 3 in conversation