Database Reference
In-Depth Information
From these results we can see that the “Computer Phobic . . . ” title has been sold one time with a total
quantity of 20 units and that there are two authors associated with this title. So far so good, but why does the
Author Order report a 3? Oh, that's because it is adding the author order numbers of 1 and 2 and displaying their
sum. We make a note of this and continue verifying other results.
Validating the Results
To further verify your results, you should run SQL statements on your data warehouse to validate the numbers a
second time. Listing 11-1 shows some SQL code that will do that for you.
Listing 11-1. Validating the Development Report
Use DWPubsSales
Go
Select *
From DimTitles
Where TitleName Like 'Computer Phobic %'
-- Results in 14
Select
TitleKey
,SalesQuantity=Sum(SalesQuantity)
,[SalesCount]=Count(*)
From FactSales
Where TitleKey='14'
Group By TitleKey
-- Results in SalesQuantity=20 and SalesCount=1 *Good*
Select
TitleKey
,[AuthorCount]=Count(*)
From FactTitlesAuthors
Where TitleKey='14'
Group By TitleKey
-- Results in AuthorCount=2 *Good*
in the real world, the calculations involved in your cubes can be quite complex. You may have to ask for
proofs from the data analysts or accounting team members. This is an important and time-consuming step in
validating your cube, and you need to plan accordingly.
Tip
In our example, the results of the SQL code confirm the results we see in the Visual Studio cube browser.
We continue to examine and validate the dimensions and measures using the cube browser and SQL code until
we have verified that all of the information is correct. Wherever we find a problem, we note it and change the
configurations to resolve it.
 
 
Search WWH ::




Custom Search