saiku自定义schema时间维度定义问题

定义时间维度时,key的定义字段,不是列名,需要是定义好的attribute名称!!!

<Dimension name='Time' table='DIM_DATE' type='TIME' key='Date'>
<Attributes>
<Attribute name='Year' keyColumn='the_year' levelType='TimeYears' hasHierarchy='false'>
</Attribute>
<Attribute name='Quarter' levelType='TimeQuarters' hasHierarchy='false'>
<Key>
<Column name='the_year'/>
<Column name='the_quarter'/>
</Key>
<Name>
<Column name='quarter_name'/>
</Name>
</Attribute>
<Attribute name='Month' levelType='TimeMonths' hasHierarchy='false'>
<Key>
<Column name='the_year'/>
<Column name='the_month'/>
</Key>
<Name>
<Column name='month_name'/>
</Name>
</Attribute>
<Attribute name='Week' levelType='TimeWeeks' hasHierarchy='false'>
<Key>
<Column name='the_year'/>
<Column name='the_week'/>
</Key>
<Name>
<Column name='week_name'/>
</Name>
</Attribute>
<Attribute name='Day' levelType='TimeDays' hasHierarchy='false'>
<Key>
<Column name='THE_DATE'/>
</Key>
<Name>
<Column name='date_name'/>
</Name>
<OrderBy>
<Column name='THE_DATE'/>
</OrderBy>
</Attribute>
<Attribute name='Date' keyColumn='THE_DATE' hasHierarchy='false'/>
</Attributes>

<Hierarchies>
<Hierarchy name='Time' hasAll='false'>
<Level attribute='Year'>
<Annotations>
<Annotation name="AnalyzerDateFormat">[yyyy]</Annotation>
</Annotations>
</Level>
<Level attribute='Quarter'>
<Annotations>
<Annotation name="AnalyzerDateFormat">[yyyy].[Qq]</Annotation>
</Annotations>
</Level>
<Level attribute='Month'>
<Annotations>
<Annotation name="AnalyzerDateFormat">[yyyy].[Qq].[mm]</Annotation>
</Annotations>
</Level>
</Hierarchy>
<Hierarchy name='Weekly' hasAll='true'>
<Level attribute='Year'>
<Annotations>
<Annotation name="AnalyzerDateFormat">[yyyy]</Annotation>
</Annotations>
</Level>
<Level attribute='Week'>
<Annotations>
<Annotation name="AnalyzerDateFormat">[yyyy].[ww]</Annotation>
</Annotations>
</Level>
<Level attribute='Day'>
<Annotations>
<Annotation name="AnalyzerDateFormat">[yyyy].[ww].[dd]</Annotation>
</Annotations>
</Level>
</Hierarchy>
<Hierarchy name='Date Only' hasAll='true'>
<Level attribute='Date'>
<Annotations>
<Annotation name="SaikuDayFormatString">yyyy/mm/dd</Annotation>
</Annotations>
</Level>
</Hierarchy>
</Hierarchies>
</Dimension>
  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值