Book Image

Microsoft SQL Server 2008 R2 Master Data Services

Book Image

Microsoft SQL Server 2008 R2 Master Data Services

Overview of this book

Table of Contents (18 chapters)
Microsoft SQL Server 2008 R2 Master Data Services
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating new members


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...