Testing Cubes in BI Projects using Excel

Recently, am involved in the BI projects testing activities. Basically, the main task is the data comparison between data in database(Source data) and the data out of our cubes (Target data).
 
Excel is chosen for the testing platform.

1. As to the 'Target Data', pivots in Excel could be used for the representation out of the cubes.
 
Data -- > From Other Sources  -- > Chosse the cube -- Finish.
Filter the pivot in Excel to get the desired data set.

2. As to the 'Source Data', there are two ways.

  2.1 Stored Procedure:

   The most advantage of using SP is flexible, since passing parameters is allowed, the interaction is realized.
   Following are the main steps:
    2.1.1. Create ODBC connection. (Name: 'test')
    Control panel --&gt
    Administrative Tools  --&gt
    Data Sources (ODBC)  --&gt
    User DSN  --&gt
    Add  --&gt
    SQL Server Native Client 10.0 --&gt
    Name, description ,Server  --&gt
    Finish

    2.1.2.Create the stored procedure in DB.
    Test  --&gt
    Programmability  --&gt
    Create Stored Procedure
    Test.[DBSchema].[StoredProcedure]
    2.1.3. Create and Edit the Macro in Excel
    View  --&gt
    Macros  --&gt
    Sub test()
    Range("A1:M500").ClearContents  //clear the contents since last loading of the data.
    Dim Parameter1 As String
    Parameter1 = InputBox("please input Parameter1 ")
    sqlstring = "exec [DBSchema].[StoredProcedure]  " & Parameter1 & " "
    connstring = "ODBC;DSN=test;UID=sa;PWD=sa;Database=test"
    With ActiveSheet.QueryTables.Add(Connection:=connstring, Destination:=Range("A1"), Sql:=sqlstring)
    .Refresh
    End With
    End Sub

 2.2 Views:  

    The current solution we are adopting is using Views, since not huge data load.
    Less steps for it:
    2.2.1 Create View in DB
    2.2.2 Connect view to represent data in Excel
      Data -- > From Other Sources  -- > Chosse the view -- Finish.
 
Last but not least, for the automation of the comparison, the rules in Excel is applied to. For the assigned cells, if they are eaqual to each other, the third cell results to "Pass", otherwise indicated as "Fail". Then apply to colors for each condition.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12374161/viewspace-667877/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/12374161/viewspace-667877/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值