In yesterday’s discussion we looked at populating entities and their related attributes. In today’s discussion we shall be concentrating on extracting data from Master Data Services, via views.
We start off by bringing up the Master Data Manager in the normal manner.
Once again, my link is http://r9-wxl90:8081/default.aspx and yours should be similar however with different server and port.
Setting up a current flag
Prior to starting, we need to understand one ‘quirky’ concept which I have yet to fathom, HOWEVER this one DID get me!!! In a nut shell, one of the reasons for utilizing Master Data Services is to permit users to update certain data fields.
Ceteris paribus, when you look at your data after having updated a field within Explorer all looks well. Should you then wish to pull the data, to be used say in Reporting Services, lo and behold, the data displayed has NOT been updated but rather is the data as it was initially loaded. This is perhaps an over simplification, meant to get the point across.
In order to extract data from MDS on a WYSIWYG basis, we need to create a ‘Current’ flag within Master Data Services AND THEN when creating a view, associate this ‘Current’ flag with the view itself. Thus what you are saying to Master Data Services is, ‘please pull the data as it currently is’.
To create the ‘Current’ Flag, choose Version Management from the home page.
The Version Management maintenance screen will appear.
Choose Manage Flags
The Manage Flags maintenance page will appear(See above).
Simply click the Green Plus Sign to add a Current Flag.
Select the Model for which you are creating this ‘Current’ Flag. The TYPE ‘Current’ into the name text box and optionally add a description. Set the ‘Committed Versions Only’ flag to false. Click ‘Save’ and we are all set.
We are now brought back to the Manager Version Maintenance Screen. What we now need to do is to select ‘Versions’ from the ‘Manage’ drop down box. Why? To associate our new ‘Current’ flag with the version. Double click the ‘Flag’ cell as shown below. You will note that the ‘Current’ flag is displayed. Click on ‘Current’ to ensure that it populates the cell.
Then click anywhere on the screen and the box / cell should be all set (as may be seen below).
We are now in a position to create our first view.
Creating our first view
Click on Integration Management.
Click on Create View (which may be found to the right of the BLUE ‘Import Data’ tab). You will be shown the create subscription view screen. You will note from my screen dump below, that I have created many views and rather than delete them to create a clean screen dump (for this article), I ask that you imagine that there is nothing there at all, for the minute 🙂
Once again, click on the green plus arrow.
The ‘Create Subscription View’ maintenance screen will appear.
Simply, enter a name for your view (in my case I called it ‘MyArticleProducts’), the model name, and choose the ‘Current’ Flag option(see the screen dump above). In the entity drop down box choose the product entity and in the format drop down box, choose ‘Leaf members’.
Then ‘Save’ the subscription view by clicking the ‘diskette’. You will be returned back to the Subscription View maintenance screen.
To confirm that you have in fact created the necessary view, let us go into SQL Server Management Studio and open the MDS database (your name for YOUR MDS database may be different depending upon what you called it during set up.. please refer to the first part of this series).
Upon opening the views, you will note that the view has in fact been created for you (see the highlighted area above) and in fact we can see a few records below:
REMEMBER, now that we have associated this view with the ‘Current’ flag, the data rendered via the view, is in fact the latest and greatest 🙂
You will also note that for those fields that were ‘Domain Based’ (see yesterday’s blog), both the ‘code’ (key) and the name(attribute value) are visible. A case at hand is the field “Available to outlet” (see above).
Today we have seen
1) How to create the ‘Current’ flag and the reason why we require this flag.
2) We created and configured a subscription view, to be used for general decision making OR to be used with SQL Server Reporting Services.
3) We ran a quick query from the view that we created.
In the next part of this article, we shall be starting off in SQL Server Reporting Services and we shall see how our data may be utilized.
As always, should you have any questions, comments or concerns, please feel free to contact me at firstname.lastname@example.org