[Step By Step]在SAP Business Objects Data Services中使用Pivot Transform行转列功能并导入到SAP HANA中(Pivot Transform)

时间:2022-04-25 16:59:55

1. 登陆进入SAP Business Objects Data Services Designer中

 

2. 创建Data store SAP HANA(SAP HANA的连接)

SAP HANA http://www.cnblogs.com/omygod/archive/2013/05/23/3094306.html

 

3. 源数据准备

在例中,数据是已经存储在SAP HANA中的行数据如下:

[Step By Step]在SAP Business Objects Data Services中使用Pivot Transform行转列功能并导入到SAP HANA中(Pivot Transform)

[Step By Step]在SAP Business Objects Data Services中使用Pivot Transform行转列功能并导入到SAP HANA中(Pivot Transform)

 

4. 创建Project. Batch Job及Data flow

[Step By Step]在SAP Business Objects Data Services中使用Pivot Transform行转列功能并导入到SAP HANA中(Pivot Transform)

 

5. 选择Data Store中的源数据表

[Step By Step]在SAP Business Objects Data Services中使用Pivot Transform行转列功能并导入到SAP HANA中(Pivot Transform)

 

6. 将上述表拖动到data flow中

[Step By Step]在SAP Business Objects Data Services中使用Pivot Transform行转列功能并导入到SAP HANA中(Pivot Transform)

7 创建Pivot transform,并连接

[Step By Step]在SAP Business Objects Data Services中使用Pivot Transform行转列功能并导入到SAP HANA中(Pivot Transform)

双击Pivot,设置Non-Pivot Colums参数

[Step By Step]在SAP Business Objects Data Services中使用Pivot Transform行转列功能并导入到SAP HANA中(Pivot Transform)

设置Pivot Columns

[Step By Step]在SAP Business Objects Data Services中使用Pivot Transform行转列功能并导入到SAP HANA中(Pivot Transform)

点击check按钮,检查相关参数是否完整

[Step By Step]在SAP Business Objects Data Services中使用Pivot Transform行转列功能并导入到SAP HANA中(Pivot Transform)

8 创建Query,并连接

[Step By Step]在SAP Business Objects Data Services中使用Pivot Transform行转列功能并导入到SAP HANA中(Pivot Transform)

双击query,我们会发现关键列在行列转换之后是不成立的:

[Step By Step]在SAP Business Objects Data Services中使用Pivot Transform行转列功能并导入到SAP HANA中(Pivot Transform)

移除CountryName的关键列属性,并新建主键列Load_ID

[Step By Step]在SAP Business Objects Data Services中使用Pivot Transform行转列功能并导入到SAP HANA中(Pivot Transform)

9. 新建Template Table,并连接

[Step By Step]在SAP Business Objects Data Services中使用Pivot Transform行转列功能并导入到SAP HANA中(Pivot Transform)

10. 运行Job

[Step By Step]在SAP Business Objects Data Services中使用Pivot Transform行转列功能并导入到SAP HANA中(Pivot Transform)

[Step By Step]在SAP Business Objects Data Services中使用Pivot Transform行转列功能并导入到SAP HANA中(Pivot Transform)

11. 在data flow 中查看数据

[Step By Step]在SAP Business Objects Data Services中使用Pivot Transform行转列功能并导入到SAP HANA中(Pivot Transform)

 

12. 在SAP HANA Studio中查看数据

[Step By Step]在SAP Business Objects Data Services中使用Pivot Transform行转列功能并导入到SAP HANA中(Pivot Transform)