BookmarkSubscribeRSS Feed
garretta
Calcite | Level 5

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'. 

Sample:

create table dev.subscription_billing_failures as

select *...

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?

Thanks

3 REPLIES 3
Linlin
Lapis Lazuli | Level 10

Hi,

If you want you code run when server is connected, try click:

tools-options-sas programs- check "submit sas code when serve is connected" - edit, paste your code there. Attached is a screen shot.


eg.png
SASKiwi
PROC Star

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:

http://support.sas.com/documentation/onlinedoc/guide/EG43MetaLibraries.pdf


While it describes EG 4.3, the same applies to EG 5.1

Patrick
Opal | Level 21

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).

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2808 views
  • 1 like
  • 4 in conversation