BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

Column names in our set-up have been designed to allow process flows to continue to function when the data is updated, with labels overlaid to clarify the content. The specific example is with years, where the column name is changed to Ym where is an integer which indicates the year as (current year minus ); the label would be overlaid as the specific year e.g. 2009.

However when the data is updated and the column label changes EG doesn't reflect that, so the label remains as the previous year which could be confusing. Is there some way to overcome that, either an option which would force EG to update to the latest labels in input data or a way of dynamically assigning column labels using metadata.

Thanks, Chris
3 REPLIES 3
Patrick
Opal | Level 21
Hi Chris

As I understand this you're changing the labels in the physical SAS data set BUT you have this data set also registered as SAS Metadata.

Now EG shows the metadata column definitions which of course aren't updated.

You could either update the metadata using SMC's update function (manual intervention), you could write a piece of code which alters the metadata definition accordingly to the physical data set (I wouldn't recommend it as there is the danger to mess up metadata), or you could not register the tables at all in the metadata so that EG shows the physical definitions from the very beginning.

I'm not aware of an option which can be set in the metadata for a specific library or even a DS in a library to not pick up the metadata definition (if the table is registered).

If the table must be defined in the metadata for some other processing then of course you have always the option to define a second library pointing to the same physical location and there you don't register the tables.

I believe what also could work is to overwrite the libref as set in metadata with a libname statement in the autoexec. I would expect that EG then shows the physical table definitions (needs to be tested).

HTH
Patrick
deleted_user
Not applicable
Hi Patrick, thanks for the information.

I believe the metadata is updated in SMC each time the data is refreshed. Looking at the dataset in EG shows the correct labels and creating a new Filter and Query node uses the correct labels, but an existing one won't update to the new labels. It appears that the node picks up the labels from the input dataset and applies them to the output dataset when the task is created and then fixes them.

Regards, Chris
Patrick
Opal | Level 21
Hi Chris

That an EG node isn't updated automatically makes kind of sense to me.

May be the concept of using variable labels to store information about the data needs some re-thinking.

If there are already a lot of EG projects / permanent output data sets having this issue then the only thing I can think of right now would be to implement some kind of post processing these data sets - i.e. an additional manually coded node where the labels of the source ds are read and then applied to the target ds.

HTH
Patrick

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1005 views
  • 0 likes
  • 2 in conversation