最具影响力的数字化技术在线社区

168大数据

 找回密码
 立即注册

QQ登录

只需一步,快速开始

1 2 3 4 5
打印 上一主题 下一主题
开启左侧

SAP HANA efashion案例(eFashion on HANA)

[复制链接]
跳转到指定楼层
楼主
发表于 2014-9-25 17:01:03 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多数据大咖,获取更多知识干货,轻松玩转大数据

您需要 登录 才可以下载或查看,没有帐号?立即注册

x


http://wiki.scn.sap.com/wiki/dis ... dn=wiki.sdn.sap.com

Introduction
For years, the BusinessObjects products have been demonstrated with the eFashion sample data set. It came in the format of a Microsoft Access database on top of which a pre-built universe was running using an ODBC connection. From there, numerous sample reports or dashboards could be built and illustrate key features of the Semantic Layer and BI client tools.
This article presents the steps to set up the same data set within HANA and BI 4.0, therefore put together a demo environment for BI 4.0 on HANA.
Highlights of this sample
  • the universe is a relational universe of the new format (.UNX) that was released with BI 4.0
  • the data set does not contain the aggregate tables anymore, it has the master data tables and one fact table (SHOP_FACTS). The aggregates are defined by Analytic Views to be imported into HANA after the tables were loaded.
  • the universe is still leveraging the aggregate_aware function to decide at runtime which aggregate to report off
Download the project filesLoad the data into HANA
  • From the local folder where you extracted the files, use an FTP client tool to copy the folder dataset/index into the work directory of your HANA instance on the HANA appliance. It would typically be /usr/sap/<SID>/HDB00/work.
  • Open the HANA DB Studio and log on with the SYSTEM user to the HANA Instance you will work with
  • From the navigator pane, expand the system and right click on "Catalog" to select "Import..."
  • Specify the location on the HANA appliance where you copied the files, typically the work directory
  • Use the following list of tables and click "Add" :
    EFASHION_TUTORIAL.ARTICLE_LOOKUP,EFASHION_TUTORIAL.ARTICLE_COLOR_LOOKUP,
    EFASHION_TUTORIAL.CALENDAR_YEAR_LOOKUP,EFASHION_TUTORIAL.OUTLET_LOOKUP,
    EFASHION_TUTORIAL.SHOP_FACTS
  • Select "Catalog + Data" and set the number of parallel Threads to 4 (should not be higher than the number of cores on your HANA appliance)
  • Click on Finish. The job should execute in a few seconds. From the navigator pane, right click on "Catalog" and select "Refresh". The new schema "EFASHION_TUTORIAL" should now appear.

Alternative method: if the steps below fail for some unknown reason, run the SQL statements below from an SQL Editor window. Before you execute it, you will need to update the path to the .ctl files in each "IMPORT FROM" statement
[AppleScript] 纯文本查看 复制代码
/* --- DROP EFASHION_TUTORIAL SCHEMA IF IT EXISTS, THEN CREATE IT --- */

DROP SCHEMA EFASHION_TUTORIAL CASCADE;
CREATE SCHEMA EFASHION_TUTORIAL;

GRANT SELECT ON SCHEMA EFASHION_TUTORIAL TO _SYS_REPO WITH GRANT OPTION;

/* --- DROP TABLES --- */
/*
DROP TABLE EFASHION_TUTORIAL.ARTICLE_COLOR_LOOKUP;
DROP TABLE EFASHION_TUTORIAL.ARTICLE_LOOKUP;
DROP TABLE EFASHION_TUTORIAL.ARTICLE_LOOKUP_CRITERIA;
DROP TABLE EFASHION_TUTORIAL.CALENDAR_YEAR_LOOKUP;
DROP TABLE EFASHION_TUTORIAL.OUTLET_LOOKUP;
DROP TABLE EFASHION_TUTORIAL.PRODUCT_PROMOTION_FACTS;
DROP TABLE EFASHION_TUTORIAL.PROMOTION_LOOKUP;
DROP TABLE EFASHION_TUTORIAL.SHOP_FACTS;
*/

/* --- CREATE COLUMN TABLES --- */

CREATE COLUMN TABLE EFASHION_TUTORIAL.ARTICLE_COLOR_LOOKUP (
  ARTICLE_COLOR_LOOKUP_ID INTEGER  NOT NULL PRIMARY KEY,
  ARTICLE_ID INTEGER  NULL,
  COLOR_CODE INTEGER  NULL,
  ARTICLE_LABEL VARCHAR(255)  NULL,
  COLOR_LABEL VARCHAR(255)  NULL,
  CATEGORY VARCHAR(255)  NULL,
  SALE_PRICE DOUBLE  NULL,
  FAMILY_NAME VARCHAR(255)  NULL,
  FAMILY_CODE VARCHAR(255)  NULL
);

CREATE COLUMN TABLE EFASHION_TUTORIAL.ARTICLE_LOOKUP (
  ARTICLE_ID INTEGER  NOT NULL PRIMARY KEY,
  ARTICLE_LABEL VARCHAR(100)  NULL,
  CATEGORY VARCHAR(30)  NULL,
  SALE_PRICE DOUBLE  NULL,
  FAMILY_NAME VARCHAR(30)  NULL,
  FAMILY_CODE VARCHAR(3)  NULL
);

CREATE COLUMN TABLE EFASHION_TUTORIAL.CALENDAR_YEAR_LOOKUP (
  WEEK_ID INTEGER NOT NULL PRIMARY KEY,
  WEEK_IN_YEAR INTEGER  NULL,
  YR VARCHAR(4)  NULL,
  FISCAL_PERIOD VARCHAR(4)  NULL,
  YERA_WEEK VARCHAR(7)  NULL,
  QTR VARCHAR(1)  NULL,
  MONTH_NAME VARCHAR(15)  NULL,
  MTH INTEGER  NULL,
  HOLIDAY_FLAG VARCHAR(1)  NULL
);

CREATE COLUMN TABLE EFASHION_TUTORIAL.OUTLET_LOOKUP (
  SHOP_ID INTEGER NOT NULL PRIMARY KEY,
  SHOP_NAME VARCHAR(50)  NULL,
  ADDRESS_1 VARCHAR(255)  NULL,
  MANAGER VARCHAR(255)  NULL,
  DATE_OPEN VARCHAR(255)  NULL,
  LONG_OPENING_HOURS_FLAG VARCHAR(1)  NULL,
  OWNED_OUTRIGHT_FLAG VARCHAR(1)  NULL,
  FLOOR_SPACE INTEGER  NULL,
  ZIP_CODE INTEGER  NULL,
  CITY VARCHAR(255)  NULL,
  STATE VARCHAR(255)  NULL
);

CREATE COLUMN TABLE EFASHION_TUTORIAL.SHOP_FACTS (
  SHOP_FACTS_ID INTEGER NOT NULL PRIMARY KEY,
  ARTICLE_ID INTEGER  NULL,
  COLOR_CODE INTEGER  NULL,
  WEEK_ID INTEGER  NULL,
  SHOP_ID INTEGER  NULL,
  MARGIN DOUBLE  NULL,
  AMOUNT_SOLD DOUBLE  NULL,
  QUANTITY_SOLD INTEGER  NULL
);

/* --- LOAD DATA FROM FILES --- */

IMPORT FROM '/usr/sap/CSA/HDB00/work/EFASHION_TUTORIAL/AR/ARTICLE_LOOKUP/data.ctl';
IMPORT FROM '/usr/sap/CSA/HDB00/work/EFASHION_TUTORIAL/AR/ARTICLE_COLOR_LOOKUP/data.ctl';
IMPORT FROM '/usr/sap/CSA/HDB00/work/EFASHION_TUTORIAL/CA/CALENDAR_YEAR_LOOKUP/data.ctl';
IMPORT FROM '/usr/sap/CSA/HDB00/work/EFASHION_TUTORIAL/OU/OUTLET_LOOKUP/data.ctl';
IMPORT FROM '/usr/sap/CSA/HDB00/work/EFASHION_TUTORIAL/SH/SHOP_FACTS/data.ctl';

/* --- LOAD DATA FROM FILES --- */

UPDATE "EFASHION_TUTORIAL"."SHOP_FACTS" MERGE DELTA INDEX;
UPDATE "EFASHION_TUTORIAL"."OUTLET_LOOKUP" MERGE DELTA INDEX;
UPDATE "EFASHION_TUTORIAL"."ARTICLE_LOOKUP" MERGE DELTA INDEX;
UPDATE "EFASHION_TUTORIAL"."CALENDAR_YEAR_LOOKUP" MERGE DELTA INDEX;
UPDATE "EFASHION_TUTORIAL"."ARTICLE_COLOR_LOOKUP" MERGE DELTA INDEX;

Import and Activate the Information Models into HANA
  • From the Quick Launch screen of HANA Studio, click on Import
  • Select Information Modeler / Information Models
  • Select the system you want to import the models into
  • Browse to the folder where you copied the project files and select the "R12" folder. Expand the efashion and tutorial package, and select the three attribute views and one analytic view that are listed. Add them to the selection and click Finish
  • A new package "efashion.tutorial" should now appear under the information models and contains three attribute views and one analytic view
  • Select the views you just imported (CTRL+click for a multi selection), right click on the selection and select "Activate"
  • The activation process will take a few seconds and upon completion a "Activation Successful" message should appear in the Deployment Log.
  • Verify the activation process created the column views under the _SYS_BIC schema.
  • The data is now imported and one analytic view active for consumption. You can now do some reporting on top that information model.
Connect and test the Universe from Information Design Tool
  • Launch Information Design Tool
  • File / Open Project...
  • Browse to the local folder where you extracted the project files, click OK, then Finish
  • You should now see a new project called "efashion on HANA"
  • Open and Edit the connection object "efashion on HANA". Edit the connection details to your HANA server : username, password, server host and port number.
  • Click Finish, then save the object.
  • You will now make this connection secured by publishing it to the BI 4.x system.
  • Right click on the connection object and select "Publish Connection to Repository"
  • Enter your credentials to the BI 4.x system, click Connect, then Next and select a folder where the Connection object will be stored
  • Open the Data Foundation object "efashion on HANA.dfx" and click on the Connection pane
  • Click on the Change Connection icon at the top left corner
  • Select the secured connection (the one you just published to the repository)
  • When prompted to update the tables qualifier and owner, click on No
  • Save the data foundation object. The universe is now ready to be published to the repository.
  • Before you publish it, you can test a few queries from the Queries pane. Use the example "yearly sales revenue per line" or build your own.

Publish the Universe to a BI 4.0 system
  • Right click on the Business Layer, and select Publish / To a repository...
  • Perform an integrity check
  • You should get a few errors and warnings that can be ignored. The isolated tables and missing primary keys on the aggregate tables are not real problems.
  • Click Next, then select a folder in the repository for the universe and click Finish
  • That is all ! The universe is ready for consumption.



楼主热帖
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 转播转播 分享分享 分享淘帖 赞 踩

168大数据 - 论坛版权1.本主题所有言论和图片纯属网友个人见解,与本站立场无关
2.本站所有主题由网友自行投稿发布。若为首发或独家,该帖子作者与168大数据享有帖子相关版权。
3.其他单位或个人使用、转载或引用本文时必须同时征得该帖子作者和168大数据的同意,并添加本文出处。
4.本站所收集的部分公开资料来源于网络,转载目的在于传递价值及用于交流学习,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。
5.任何通过此网页连接而得到的资讯、产品及服务,本站概不负责,亦不负任何法律责任。
6.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源,若标注有误或遗漏而侵犯到任何版权问题,请尽快告知,本站将及时删除。
7.168大数据管理员和版主有权不事先通知发贴者而删除本文。

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

站长推荐上一条 /1 下一条

关于我们|小黑屋|Archiver|168大数据 ( 京ICP备14035423号|申请友情链接

GMT+8, 2024-5-3 04:09

Powered by BI168大数据社区

© 2012-2014 168大数据

快速回复 返回顶部 返回列表