Hello all,
As per the commitment i have made earlier in my earlier blog CodePlex- Managed Metadata focused solutions-Part 1, this is the part 2 of this series of write ups, CodePlex- Managed Metadata focused solutions.
In this blog i will elaborate the SharePoint 2010 Managed Metadata Importer. It is the simple yet upto the mark kinda command line utility.
The problem statement is simple:
Need a command line tool to add the new terms set in the Group of the Managed Metadata Service.
Solution:
Solution is the above tool.
As per my requirement i have the Term Group Name RockShare,
I grab term set SVC file from the previous solution which i have discussed before, you can get it from there, in the source code, or you can get from here, put it in my C drive.
As i run the importer tool, i got command line window, i entered the details as per the requirement (site url, path of CSV file, Managed Metadata Service name, Group Name)
Just after mentioning the Term Group Name and hit the enter key. Its show you the term which are adding in the heiarchial forma. After filling up the command line window altogether in a split of seconds( depends upon your machine performance :)), the command line window will disappear. Just to check what it has done to my Terms Set, well well it populated all the terms mention in the CSV accordingly.
Deep Dive in the Code:
Simple but powerful tool. Full marks to the contributor. If you look into the code, there isn’t difficult to understand, well commented and nicely elaborated. It will populate the term till 7th level,
If you just look into the Main method, you will understand that how the code is getting the Term Set Group, from the parameters provided. Then picking the Term Set Name, from CSV, creating new term set, and then adding all the term, 2nd level Term.
My advice is to you guys always that do read the code, it will increase your understanding with the system and architecture.
Happy SharePointing 😀