08-09-2016 07:13 AM
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?
08-09-2016 07:21 AM
08-09-2016 08:36 AM
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.
08-09-2016 08:44 AM
08-09-2016 08:52 AM
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.
08-09-2016 09:11 AM
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.