Creating new members in an MDS model is likely to be one of the more common processes you will carry out. New members are created by loading data into the mdm.tblStgMember
table. As noted in the table definition in the previous section, a MemberType_ID
of 1
will create a leaf member and a MemberType_ID
of 2
will create a consolidated member. The differences between these two member types are discussed in Chapter 4.
In the following example, we will insert records as new leaf members from a view in the AdventureWorks database containing UK store details into the Store entity of our Store model. Note the MemberType_ID
of 1
indicating we are loading new leaf members.
Note
In a production environment, to avoid duplication you may need to join your source data to a MDS Subscription View to ensure that you don't reload existing members, only new ones. Subscription Views are covered in detail in Chapter 8, Extracting Data from Master Data Services
/* Load new leaf members into...