09-11-2012 04:26 PM
Within Enterprise Guide 5.1, I am using PROC SQL to create a table within a BASE SAS library I had already created called 'DEV'.
create table dev.subscription_billing_failures as
After creating the table within the 'DEV' library, I went to build a cube from it and found that I could not do so until I registered it. The table that I am creating in Enterprise Guide will be dropped and recreated daily as part of a scheduled job. Is there a way to also register this table every day as part of the automated process so that I don't have to do so manually?
09-11-2012 06:10 PM
09-13-2012 08:16 PM
Synchronising your SAS metadata with changed SAS data libraries can be done in a number of ways including:
1) Running PROC METALIB.
2) Use EG 5.1 Tools > Update Library Metadata
This document gives you more details:
While it describes EG 4.3, the same applies to EG 5.1
09-14-2012 05:00 AM
There is a difference between a physical table (the one you create in your SQL job) and a metadata table object.
If you have a physical table then you can create a metadata table object (which is needed to build the cube) by simply using the attributes of the physical table and synching it with metadata. That's what I assume you've done.
Now even if you delete the physical table the table metadata object will still exist. You will get an error/warning when you click on it to see the underlying physical data (as there is none) but the object as such is still there. Just re-run your code creating the physical table and things will work again.
It's kind of like if you create a view. Only because you delete the table doesn't delete the view. The view won't work without the table but simply by re-creating the table the view will work again without any need to touch the view at all. And also like view and table: If the structure of the physical table changes (eg. column added or removed) the you have to re-created the view (or sync the metadata table object with the physical table).