how to insert data in master data services programmatically

3.5k views Asked by At

I'm trying out Microsoft Master Data Services and I would like to add data to the database programmatically. I'm starting to get the model/entity/member structure but I'm not yet sure. If you have a nice explanation for this structure, please share.

Say somebody added a new employee in an ERP system and I would like to send that to the MDS. How would I do that? Is the data that I want to add a new member? Because if I look at the following information (http://technet.microsoft.com/en-us/library/hh230995), the only way to import data is through entities?

Thanks in advance for any useful information about this!

3

There are 3 answers

5
Arun On BEST ANSWER

Lets start with the basics.

  • Entities in Master Data Services (MDS) are roughly analogous to tables in a regular database.
  • Every entity must live in a model.
  • A model can contain any number of entities.

The Metadata* methods you see on that page can be used to create, read and update models and entities. Once you have modeled your ERP tables as an MDS model, you can use the EntityMembersCreate API (with the relevant model/entity information) to create a member (roughly analogous to a row in a table). You can use EntityMembersUpdate to update members and EntityMembersDelete to delete them.

Another way to get large amounts of data into MDS is by using Entity Based Staging. Entity Based Staging allows you to use tools like SSIS to get bulk data into MDS. A good primer here: http://msdn.microsoft.com/en-us/sqlserver/hh802433.aspx.

I hope this helps. Feel free to ask more questions.

0
MikeyBlue On

We're using SSIS to replicate data from our CRM (as well as other data sources) into our MDS (for the time-being). If you're not familiar with the tool, I'd recommend in terms of moving data around - it's relatively easy to pickup the basics. If you go this route, here's a great resource I followed to push data into our MDS system:

http://www.sqlchick.com/entries/2013/2/16/importing-data-into-master-data-services-2012-part-2.html

1
New Venture Websites On

I like using a generic data-access-object that classes in my model inherit from. Each class has a one to one relationship with tables in the database.