脱机多维数据集CUB文件的生成

       在运用多维数据进行分析的时候,通常很有可能我们需要把这些多维数据脱机进行处理或演示,这其中就要用到cub文件,因此怎么生成CUB文件就成了关键,最近我做一个小项目用到了这个,也看了MSDN中的一个例子,感觉说的是不够详细,因此我就把自己写的一个简单MDX语句供给大家看一下:

   CREATE GLOBAL CUBE [testStudy1]
   Storage 'C:\localStudy.cub'
   FROM [Test]
   (
      MEASURE  [Test].[成绩],
      DIMENSION [Test].[Time],
      DIMENSION [Test].[Student]
    )

   其中create Glogbal cube 就不用多说了,

里面的testStudy1是要创建的新多维数据集的名称,

C:\localStudy.cub就是要创建的多维数据集的文件名及路径

Test就是新多维数据集所基于的多维数据集的名称。

下面的Measure就是新建的多维数据集中的度量值

Dimesion就是基于那些维度,这只是一个简单的例子,下面有Tim Peterson在MSDN论坛上的一个回答,希望对大家有所帮助。


We create AS2005 local cube files programmatically in CubeSlice like this:

1. We use the AMO Scripter to generate a Create ASSL script for the database.

2. We manipulate the script in a number of ways:

  Removing unwanted cubes, dimensions, levels, measures, and other objects.

  Slicing on particular members, if desired.

  Switching to an Analysis Server source, if desired.

  Manipulating the DataSourceView to reduce the size of the local cube, if desired.

  Consolidating partitions, if necessary.

  Taking care of other issues.

  Batching the Create script together with a Process script.

 3. We then use an ADOMD Cellset to create the local cube. The ASSL script is assigned as the Source of the Cellset. When the Cellset is opened the local cube is created.

There are a lot of things that need to be considered when creating local cube files. If you can use the script generated from the Scripter without modifications, it's not too difficult. If you want to minimize the size of your local cubes (which improves browsing performance) there's more work involved. We're trying to provide the choices to make it easy with our product, CubeSlice 9 (now in beta). We allow local cube creation to be scheduled using a command and parameters. We do not (not yet at least) provide an API to call our product.

We haven't fully documented all the ways we manipulate the ASSL script in creating the local cube. Our product exposes the script we use, so that you can examine how individual situations can be handled.

Tim Peterson

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值