BookmarkSubscribeRSS Feed
bheinsius
Lapis Lazuli | Level 10

Hi,

 

SAS VA creates visual data queries for tables that you load interactively.

I am looking for a way to reload these tables automatically after a restart of the LASR server, but cannot find it.

 

Therefore I am looking for the SAS code that is stored in the visual data query, to execute it from my own reload program.

I have looked in the SAS DMS Metabrowse tool for the SAS code but cannot find it.

Can someone help?

 

Regards,

Bart Heinsius

5 REPLIES 5
JuanS_OCS
Amethyst | Level 16
Hi Bart, when you schedule a data query on SAS VA, it creates already a command line on your scheduler (Windows scheduler/crontab/at). You can use this command line from any script to call the load of the query. Therefore, if you know when the LASR server starts, you can create a dependency to check first when LASR is fully started, then start loading your queries, ensuring to give some time between each query load execution, to not degrade the performance of your VA server. I hope this helps. Please let me know if you have further questions!
bheinsius
Lapis Lazuli | Level 10

Hi Juan,

 

I don't mean a data query as created through the prepare data application.

I load a data set from the SAS VA Administration application (RMB on table-> Load a Table...)

For this action, VA creates a Visual data query that it stores alongside the LASR table metadata registration.

It is also this data query that is executed when i click Reload on the table in the LASR Table webpage.

 

It is this data query that i want to obtain the SAS code from, programmatically.

 

Thanks,

Bart

JuanS_OCS
Amethyst | Level 16
Hi Bart, what you need is possible: Please follow the following steps: Configure SAS Visual Analytics to Save Code 1) Create the a folder to save the queries (sas programs) Eg. C:\tmp\VACode. Ensure it has the required permissions for the SAS users and SAS accounts. 2) Log into http://yourserver.com/SASVisualAnalyticsHub 3) Select Manage Environment 4) Select File Preferences 5) Select Manage Environmen 6) Select Record actions as SAS statements and enter the path as: E:\tmp\VACode 7) Select OK Then, the next time you will generate an action on the SAS VA Administration (Load a Table, Unload a Table, start LASR, stop LASR, etc), this action will generate a .sas file on the defined location. Afterwards, I trust you can generate a bat file to run the sas program and schedule it 🙂
bheinsius
Lapis Lazuli | Level 10

Hi Juan,

 

Thanks but that is still not what i want because then i must do this manually for every new table that any user loads.

I want to do this programmatically, just like you can do interactively in the SAS VA Administrator hub by clicking all tables and selecting the Reload icon.

 

Looking in metadata I got pretty far, up to the point where the data query code is stored in SAS metadata and not being able to extract that from metadata.

 

Regards,

Bart

JuanS_OCS
Amethyst | Level 16

Hi Bart,

 

I think I misunderstood your initial message where you mentioned you still did not found the query on the metabrowse. Sorry for that. 

 

Speaking about VA, I would tweak as less as possible and this seems a bit like tweaking the metadata. Experience says that you might solve a problem now, but easily generate additional problems (technical or functiona) or impact on time on other activities. But this is your server of course and you decide if you want to add an unsupported feature on your system or not.

 

Anyway, if you still want to follow this path:

I think it is great that you now found the query on the metadata. Why can you not extract the query from the metadata? Maybe this should be the first question. What is your challenge? The XML query for the Metadata Interface?

 

In other hand, I trust that easiest solutions are generally the best. This one still seems to be a bit complicated. Let me explain:

 

You want to programatically load tables already registered by users in the metadata, and action them on a certain schedule. OK, fine.

If you are able to enable that option for all the users, and ask your users to load (one time action) their tables to generate the SAS codes. From this moment, each time a user will load/register a table, it will generate the sas program.

Then, you should be able to go through all the deployed sas programs and execute only the ones that are named with the "load" string on the name of the sas program. This will load all the tables,always. The script might find old scripts, which you can clean also programatically, or just let them to fail.

 

This is probably very similar to what you want to achieve with the metadata, therefore probably none of those options is preferable from the "twaeking" point of view, but I see this one easier and preferable from the maintenance point of view.

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 1688 views
  • 0 likes
  • 2 in conversation