SQL Analysis Services OLAP TIME维度 [英] SQL Analysis Services OLAP TIME dimension

查看:80
本文介绍了SQL Analysis Services OLAP TIME维度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我正在努力将时间维度添加到OLAP多维数据集. 我可以使多维数据集中的所有内容(日期除外)都能正常工作.

Hi i'm struggling with adding time dimension to OLAP cube. I can get everything in cube to work except date.

在源数据视图中,我有datetime列.

In my source data view I have datetime column.

我使用维度"->新维度"->"在服务器上生成时间维度" . 我最终得到了一个很好的层次时间维度(Date-Month-Quarter-Year Year).

I go by using Dimensions->New Dimension->Generate time dimension on the server. I end up with a nice hierachical time dimension (Date-Month-Quarter-Year).

稍后,我将此维度添加到多维数据集,并从源数据视图(具有事实数据的同一表)中定义与datetime列的常规关系.

Later I add this dimension to cube and define regular relationship with datetime column from source data view (same table which has fact data).

当我尝试部署多维数据集时,出现错误:

When I try to deploy the cube, I get error:

OLAP存储引擎中的错误:处理时找不到属性键:表:"table_name",列:"registration_date",值:"3/29/2007 3:00:00 PM".该属性为日期"

Errors in the OLAP storage engine: The attribute key cannot be found when processing:Table: 'table_name', Column: 'registration_date', Value: '3/29/2007 3:00:00 PM'. The attribute is 'Date'

也许我什么都没得到?我能找到的每本手册都涉及源数据库中已经创建的日历表.有很多脚本可以为您创建日历表.但是我为什么要呢? 在服务器上生成时间维度不是要这样做的吗?

Maybe I don't get something? Every manual I can find talks about calendar table already created in the source database. There are plenty of script which will create calendar table for you. But why should I ? Isn't Generate time dimension on the server meant for it?

推荐答案

我猜想事实表中的日期字段需要在时间维度中显示.也许删除时间或在SSAS设计器中创建一个计算字段.更多经验的人可能会有更好的答案,我只做了一个立方体.

I would guess that your date field in your fact table needs to be present in the time dimension. Perhaps remove the time or create a calculated field in the SSAS designer. More experience people may have better answers, I've only made one cube.

这篇关于SQL Analysis Services OLAP TIME维度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆