BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sanalitics
Obsidian | Level 7

Hi All,

 

Kindly let me know if there is an automation process/procedure that could be used to create the metadata folder from the folder structure saved in EXCEL...

 

Thanks,

Sandeep

 

1 ACCEPTED SOLUTION

Accepted Solutions
Patrick
Opal | Level 21

@sanalitics

It could be done but I'm not aware of any ready-to-use code for it and though you would have to write this code yourself.

The metadata API is not very "user-friendly" and it would be quite a bit of work to implement something robust where you don't risk to corrupt metadata.

For this reason: If this is about getting the job done then I'd only consider something like this for 200+ folders. Else: Use SMC or DIS and do it manually. That's going to be faster and safer. 

View solution in original post

6 REPLIES 6
Kurt_Bremser
Super User

The proper way to export/import metadata structures is to create SAS packages with Management Console.

I would only try to manipulate the metadata with an Excel source if

  1. I had a strong masochistic streak
  2. I had too much time at hand
  3. I had a good backup

As it is, I only have the third item.

sanalitics
Obsidian | Level 7

Hi Kurt,

Thanks for the reply. But what I need to know is if there is way to automate where we have created all the folder structure and hierarchy in an excel and instead of creating the metadata folder structure manually in DI or SMC.. I want to know a method which could help me copy the same structure as in EXCEL.

Kurt_Bremser
Super User

Why, in $DEITY's name, do you create the folder structure in Excel? That's just a colossal waste of time. The tool for this is the Management Console. Just look at the Authorization tab of one folder and see how you represent that reliably in Excel, followed by code to get that into SAS without destroying your folder structure (up to the point where it crashes the metadata server).

Just follow the link provided by @SASKiwi to get an idea of the work that awaits you.

 

Using any other tool than the SMC only makes sense if you have a very good understanding of the internal works of the SAS metadata. (eg you are working in Cary, NC).

 

Patrick
Opal | Level 21

@sanalitics

It could be done but I'm not aware of any ready-to-use code for it and though you would have to write this code yourself.

The metadata API is not very "user-friendly" and it would be quite a bit of work to implement something robust where you don't risk to corrupt metadata.

For this reason: If this is about getting the job done then I'd only consider something like this for 200+ folders. Else: Use SMC or DIS and do it manually. That's going to be faster and safer. 

SASKiwi
PROC Star

I'm in total agreement with @Kurt_Bremser.

 

If you need any further confirmation of the complexities of SAS metadata read on:

http://documentation.sas.com/?docsetId=omaref&docsetTarget=maincontents.htm&docsetVersion=9.4&locale...

 

And then agree with us that there are better things to do than building your own metadata interface tool...

AllanBowe
Barite | Level 11

It's possible, you could create a stored process or even upload your excel to a web application and run this macro:

 

%mm_createfolder(path=/some/meta/folder)

 

We use it in our automated builds for Data Controller.  The Viya version of the macro is here.

/Allan
SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs

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!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1174 views
  • 6 likes
  • 5 in conversation