SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Help: how to update (only adding columns) a table in the metadata (SAS9.3)

Reply
SAS Employee
Posts: 10

Help: how to update (only adding columns) a table in the metadata (SAS9.3)


Hi there,

I need your help: I have to update the metadata for a table with base program code (SAS9.3). I should only add the attribute for columns to the metadata. It's not allowed to delete descriptions from old columns although if this old columns no more exist in the physical table. what's the procedure for resolving this problem?

Thank you very much for your support

Brigitte

Super User
Posts: 5,431

Re: Help: how to update (only adding columns) a table in the metadata (SAS9.3)

Posted in reply to Brigitte_sas

Please help me out on what you are trying to achieve, and why?

What does your environment look like, do you use DI Studio, or just SMC as metadata tool?

Can't really picture the scenario, is that you need to make new columns available in a data mart for end users, because of some kind of dynamic transpose of data?

Data never sleeps
SAS Employee
Posts: 10

Re: Help: how to update (only adding columns) a table in the metadata (SAS9.3)

Hi LinusH,

I've only the SAS Management Console and SAS Enterprise Guide for reprocessing the data.

I preassign the library with the Metadata LIBNAME Engine Statement:

     libname lib1 meta library="DBS" metaout=data;

We extract data  from oracle and transpose this data. The final dataset I have to update in the metadata so that the user can work with the SAS Enterprise Miner with this dataset. So we have no historical data and need all the columns (the old one and the newest) just in case we have to run an old Mining process.

Best regards,

Brigitte

Respected Advisor
Posts: 3,156

Re: Help: how to update (only adding columns) a table in the metadata (SAS9.3)

Posted in reply to Brigitte_sas

There are two ways I know of to updata (sync) your metadata:

1. Manual way: if you don't do it on a regular basis and there aren't many of them, you can use MC:

Plug-ins -> Data Library Manager, right click your target table, then select "update metadata..."

2. Proc Metalib. It is often used in batch update via automated process. Use EG to do the update.

Haikuo

Super User
Posts: 5,431

Re: Help: how to update (only adding columns) a table in the metadata (SAS9.3)

Posted in reply to Brigitte_sas

I would take a look at PROC METALIB, seems fairly easy.

SAS(R) 9.3 Language Interfaces to Metadata

Data never sleeps
SAS Employee
Posts: 10

Re: Help: how to update (only adding columns) a table in the metadata (SAS9.3)

Hi There,

thank you for your answers. proc metalib is very well and fine, but it is not enough! When I update the metadata I will hold the metadata information about the deletes columns AND additionaly the information about the new columns.

I think I have to look for a workaround on physical level.

Thank you very much for your proposals.

Cheers,

Brigitte

Respected Advisor
Posts: 3,156

Re: Help: how to update (only adding columns) a table in the metadata (SAS9.3)

Posted in reply to Brigitte_sas

I finally understand what you want, but you lost me right there. So basically you need a metadata that will hold both deleted and existing columns information. Why? what is the point to have a metadata that does not match what you have in the data source? If you have a constantly changing data source, then you need to update (sync) your metadata just as often. You can choose to run Proc metlib in batch on regular basis (we do it daily at middle night) or on the fly every time before you use it.

Just my2cents.

Haikuo

Ask a Question
Discussion stats
  • 6 replies
  • 610 views
  • 6 likes
  • 3 in conversation