BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello,

I'm adding and modifying columns from a certain table, after running a little proc SQL in the source editor, the columns changes aren't visible when I look at the table properties, I have to update the table metadata first to see the desired changes.

Since I want to automate this process, is there anyway to update the table metadata from the physical table in source editor (macro, or something else)?

Thanks in advance.

Eduardo
5 REPLIES 5
Patrick
Opal | Level 21
Eduardo

To create/update table metadata from SAS file source is implemented in DIS 4.2

Also that it's possible I wouldn't recommend to write own code for altering metadata. The risk to mess-up the whole repository is just to big.

Cheers
Patrick
deleted_user
Not applicable
Hello Patrick,

thanks for your quick answer, if I was in DIS 4.2 how could I do it?

Cheers,
Eduardo
Patrick
Opal | Level 21
Hi Eduardo

Update existing table metadata:
Right click on table node, choose "Update Metadata"

Register new tables in repository:
Right click on library node, "register tables"

Cheers
Patrick
deleted_user
Not applicable
Hi Patrick,

I think you misunderstood my question, I want to know if it is possible to update a table metadata by running some kind of script, without any human interaction.

Basically I am altering tables with a proc sql, I want to know if there is any kind of command or macro that I can invoke and that updates the table metadata without having to interact with each altered table,

Thanks in advance.
Eduardo
Patrick
Opal | Level 21
Hi Eduardo

As much as I know there is no such built-in function or macro in SAS and I also don't know about a user written macro which is "published".

Considering that table metadata contains also things like constraints and keys implementing automated metadata update functionality might be a bit more complicated than you think.

Table metadata is something which shouldn't be subject to regular change and not all SAS tables have to be registered as metadata.

I'm a regular SAS DI user and I wouldn't be pleased at all if you would automatically change "my" table metadata without having made an impact analysis.

I have table metadata where the physical path / table name contains a macro variable which is dynamically populated during job execution and then points to a context specific physical table. The relation metadata table : SAS table is one:many.

The questions for you will be:
Where are these table metadata used?
Is it necessary to have these tables registered at all?
What is the possible impact if changing the metadata definitions?
Who has to be informed?

Cheers
Patrick

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 5 replies
  • 724 views
  • 0 likes
  • 2 in conversation