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
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.
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
As it is, I only have the third item.
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.
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).
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.
I'm in total agreement with @Kurt_Bremser.
If you need any further confirmation of the complexities of SAS metadata read on:
And then agree with us that there are better things to do than building your own metadata interface tool...
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.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.