码迷,mamicode.com
首页 > 其他好文 > 详细

Generate Time Data(普通日期主数据)

时间:2015-12-12 01:29:32      阅读:233      评论:0      收藏:0      [点我收藏+]

标签:

Note: While using this option you need to replicate the standard table into SAP HANA that is T005T, T005U, T009, and T009B. If these standard tables are not available then you will not be able use the “Generate Time Data” function.如果使用 “Generate Time Data”选项生成时间主数据时,需要将ECC里的 T005T, T005U, T009, and T009B里的这些表复制(连带数据)到HANA里来,如果这些表不存在,则不能使用该项功能。
技术分享
技术分享
 
1. Open the Quick Launch Page 
•From the Help Menu > Quick Launch(如果是Eclipse插件,则为Quick View)
 技术分享
2. Click on “Generate Time Data” under Data.       
 技术分享 
3. Enter the following entries.
 •Select Gregorian as the Calendar Type.
•Enter 2010 to 2011 (you can use any year)
•Select DAY for the Granularity
•Click Generate.
 技术分享 
4. Check the Generated data within the table “_SYS_BI.M_TIME_DIMENSION”. There should be an entry for every DAY between 2010 and 2011.
 技术分享 
技术分享
5. Create an Attribute view 
生成时间属性视图,以便使用上面生成的Day时间主数据
•Right Click on Attribute View > New > Attribute View.
 技术分享 
6. Enter “TIME_01” for the name of the view 
•Select Time ->Gregorian.(当然,也可以不选择Time,Atrribute View Type直接设置为默认的Standard标准也是可以的,这样就需手动将相应粒度的维度拖进属性视图了,只不过这里创建时间属性视图时,会自动根据你选择的时间粒度将相应的时间维表加进来而已,这样方便快捷
•For the Granularity select “Date”
•Click on Auto Create.
•Click Finish.
 技术分享
 7. As a result you will see the Dimensions table with the generated Attributes. Optionally you can remove any attribute fields that are not needed.
当选择属性视图类型为Time类型时,根据你选择的时间粒度Granularity,自动将相应的时间表(这里为_SYS_BI.M_TIME_DIMENSION)加入到属性视图中,并且默认将这个时间维表里的所有字段做为视图的输出字段,你可以根据实际的需要删除一些不需要的属性字段
 技术分享 
8. Save the view first. Right Click on the Attribute View > Activate.
技术分享 
9. Right Click on the Attribute View > Preview.
 技术分享 
10. Create the Analytical view and use the Attribute view: “TIME_01”
 在分析视图中使用上面创建的时间属性视图
 技术分享
 
11. Enter “AN_TIME_00” for the name of the view.
•Click finish.
 技术分享 
12. Click on Add link 
•Search for CE1IDEA table(CE1IDEA应该是个业务数据表)
•Click Ok
 技术分享
13.  Add HZDAT as an Attribute. Right click on HZDAT(HZDAT为到天的且带日期格式的日期,10位,日期格式应该与当前登录的国家语言环境有关 > Add as Attribute.
 技术分享 
14.  Open the Logical View(新版本的Studio应该是Star Join). Click on the tab ‘Logical View’ at the bottom of the detail screen. 
•Drag TIME_01 attribute view in Window.将TIME_01时间属性视图里的DATE_SQL拖到业务表的HZDAT时间字段上,产生关联
•Create a Referential (n ..1) Join between TIME_00.DATE_SQL and Data Foundation HZDAT field.
 技术分享 
15. Activate & Preview.
这样就可以对业务表CE1IDEA按季度(QUARTER)进行分析了(当然也可以按照月MONTH时间维度进行数据分析)
 技术分享





Generate Time Data(普通日期主数据)

标签:

原文地址:http://www.cnblogs.com/jiangzhengjun/p/cc15aa78b44df6982e15c973ac2ad359.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!