SAP HANA Studio 建模初体验

SAP HANA Studio 建模:

创建表:

Person表:

ID                        VARCHAR    3
NAME                 VARCHAR    20
LAST_NAME     VARCHAR    30
DOB                    VARCHAR   8


Create ROW  Table Person(

   ID VARCHAR(3) PRIMARY KEY,

   NAME VARCHAR(20),

   LAST_NAME  VARCHAR(30),

  DOB  VARCHAR(8)
)

PROJECT表:

ID                          VARCHAR     3    Key Field
NAME                   VARCHAR     20  Key Field
RESOURCES    INTEGER
BUDGET             DECIMAL       8,2

Create Column  Table  PROJECT(

   ID VARCHAR(3) NOT NULL,

   NAME VARCHAR(20) NOT NULL,

   RESOURCES  integer,

  BUDGET   decimal(8,2),
  PRIMARY KEY(ID,NAME)
)

 

 

插入数数据:

insert into "P1526659201"."PERSON" values('001','John','Smith','19750112');
insert into "P1526659201"."PERSON" values('002','John','Doe','19800101');
insert into "P1526659201"."PERSON" values('003','Joe','Page','19760228');
insert into "P1526659201"."PERSON" values('004','Sally','Ryan','19771230');
insert into "P1526659201"."PERSON" values('005','John','Sanders','19451122');
insert into "P1526659201"."PERSON" values('006','Peter','McDonald','19670818');
insert into "P1526659201"."PERSON" values('007','Mike','Melvin','19750812');
insert into "P1526659201"."PERSON" values('008','Chris','Jones','19750813');
insert into "P1526659201"."PERSON" values('009','Daniel','Stone','19720726');
insert into "P1526659201"."PERSON" values('010','Judy','Jones','19701210');
insert into "P1526659201"."PERSON" values('011','Mike','Peters','19810404');
insert into "P1526659201"."PERSON" values('012','Joshua','Reynolds','19750217');
insert into "P1526659201"."PERSON" values('013','Anne','Word','19710310');
insert into "P1526659201"."PERSON" values('014','Jeff','Field','19681215');
insert into "P1526659201"."PERSON" values('015','Megan','Ford','19700909');

 

insert into "P1526659201"."PROJECT" values('001','ABAP Models',2,10456.34);
insert into "P1526659201"."PROJECT" values('001','ABAP on Eclipse',5,20000.00);
insert into "P1526659201"."PROJECT" values('001','ABAP on HANA',2,45500.00);
insert into "P1526659201"."PROJECT" values('002','SUP Apps',3,3567.12);
insert into "P1526659201"."PROJECT" values('003','Code Refactoring',1,5120.50);
insert into "P1526659201"."PROJECT" values('004','SAPScript convertion',5,567.90);
insert into "P1526659201"."PROJECT" values('004','Adobe Forms Docs',2,345.19);
insert into "P1526659201"."PROJECT" values('004','Smart Forms Docs',6,462.10);
insert into "P1526659201"."PROJECT" values('004','Smart/Adobe Forms',2,234.90);
insert into "P1526659201"."PROJECT" values('005','HANA Apps',2,50000.00);   
insert into "P1526659201"."PROJECT" values('005','BW on HANA',4,50000.00);
insert into "P1526659201"."PROJECT" values('006','Flex Apps',7,3500.50);
insert into "P1526659201"."PROJECT" values('006','Dashboards',3,2345.29);
insert into "P1526659201"."PROJECT" values('006','XCelsius',4,5678.10);
insert into "P1526659201"."PROJECT" values('007','ABAP Classes',2,1250.10);
insert into "P1526659201"."PROJECT" values('008','OSS Notes',2,2500.00);
insert into "P1526659201"."PROJECT" values('009','SUP Killer Apps',2,5600.50);
insert into "P1526659201"."PROJECT" values('009','SAP Gateway',7,5800.00);
insert into "P1526659201"."PROJECT" values('009','SUP and Gateway',5,5678.00);
insert into "P1526659201"."PROJECT" values('010','Blue Ruby',6,3500.00);
insert into "P1526659201"."PROJECT" values('010','Blue Python',4,3500.00);
insert into "P1526659201"."PROJECT" values('011','ABAP Editor',5,4000.00);
insert into "P1526659201"."PROJECT" values('011','ABAP Debugger',5,2000.00);
insert into "P1526659201"."PROJECT" values('012','EP',5,8500.50);
insert into "P1526659201"."PROJECT" values('012','KM',5,6500.50);
insert into "P1526659201"."PROJECT" values('012','MI',3,4500.50);
insert into "P1526659201"."PROJECT" values('013','SAP Education',6,5000.00);
insert into "P1526659201"."PROJECT" values('013','Certifications',3,3000.00);
insert into "P1526659201"."PROJECT" values('014','SAP FI',4,500.50);
insert into "P1526659201"."PROJECT" values('014','SAP SD',6,400.50);
insert into "P1526659201"."PROJECT" values('014','SAP CO',3,500.40);
insert into "P1526659201"."PROJECT" values('014','SAP MM',7,400.50);
insert into "P1526659201"."PROJECT" values('014','SAP WM',2,300.99);
insert into "P1526659201"."PROJECT" values('015','Research',1,5000.00);
insert into "P1526659201"."PROJECT" values('015','Development',4,8000.00);

 

创建Area表:

ID           VARCHAR     3    Key field
AREA     VARCHAR    20

 create column table area (
id varchar(3) primary key,
area varchar(20)
);

获取连接SAP HANA服务器的FTP账号的相关信息:

SELECT * FROM SYSTEM.FTP_SERVER

 

创建文件Area.ctl,并把Area.ctl上传到 /BLOG,Area.ctl文件内容为

import data into table P1526659201."AREA" 
 from 'Area.csv'
 record delimited by '\n' 
 fields delimited by ','
 optionally enclosed by '"'
 error log 'Area.err'

打开SQL Edit执行导入数据语句:

IMPORT FROM '/dropbox/Blag/Area.ctl';

 

10 3 添加系统 ............................................................................................................................... 12 4 导入元数据 ........................................................................................................................... 13 4.1 为导入元数据配置Data Service ..................................................................................... 13 4.2 创建模式 ........................................................................................................................ 14 4.3 导入数据表定义 ............................................................................................................. 14 4.4 添加连接 ........................................................................................................................ 16 5 加载数据到数据表定义 ........................................................................................................ 17 5.1 暂停加载数据 ................................................................................................................. 18 5.2 恢复加载数据 ................................................................................................................. 18 5.3 从Flat Files 上传数据 ............................................................................................... 19 6 复制SAP 交付的内容 ............................................................................................................ 20 7 建立编辑模式到物理模式的映射 ......................................................................................... 21 8 设置建模工具的首选项 ........................................................................................................ 23 9 创建内容对象........................................................................................................................ 26 9.1 创建包 ............................................................................................................................ 29 9.2 创建属性视图 ................................................................................................................. 31 9.3 创建分析视图 ................................................................................................................. 35 9.4 创建计算视图 ................................................................................................................. 38 9.4.1 管理属性映射 .......................................................................................................... 42 9.4.2 常量字段 .................................................................................................................. 43 9.5 创建分析权限 ................................................................................................................. 44 9.6 创建过程 ........................................................................................................................ 46 9.7 使用货币和计量单元 ..................................................................................................... 48 9.8 分配变量 ........................................................................................................................ 49 9.9 查询相关数据表 ............................................................................................................. 50 9.10 使用系统生成的表连接 ................................................................................................ 51 9.11 激活对象....................................................................................................................... 52 9.12 创建导入参数 ............................................................................................................... 53 9.13 创建层级结构 ............................................................................................................... 54 9.14 维护查询属性 ............................................................................................................... 55 9.15 管理数据基础布局 ....................................................................................................... 56 9.16 Content Assist 中的SQL 功能 ....................................................................................... 56 9.17 表达式中的函数 ........................................................................................................... 58 10 处理内容对象 ...................................................................................................................... 62 10.1 内容对象的数据预览 ................................................................................................... 62 10.2 校验模型....................................................................................................................... 62 10.3 内容对象版本比较 ....................................................................................................... 63 10.4 查看内容对象版本历史信息 ........................................................................................ 63 10.5 切换未激活对象的所有权 ............................................................................................ 63 10.6 生成对象文档 ............................................................................................................... 64 10.7 启用多语言支持的对象 ................................................................................................ 65 10.8 检查模型引用 ............................................................................................................... 65 10.9 查看作业日志 ............................................................................................................... 66 11 导出对象 ............................................................................................................................. 67 11.1 创建交付单元 ............................................................................................................... 67 11.2 使用交付单元导出对象 ................................................................................................ 68 11.3 使用开发模式导出对象 ................................................................................................ 68 11.4 使用SAP 支持模式导出数据 ........................................................................................ 69 12 导入对象 ............................................................................................................................. 70 12.1 使用交付单元导入对象................................................................................................ 70 12.2 使用开发模式导入对象................................................................................................ 70
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值