[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

时间:2021-02-23 16:53:53

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. 文件准备

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

4. 在左下角File标签页中找到XML Schema,并右键新建

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

5. 填写相应的参数

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

点击OK之后,进入XML Schema的设计信息中

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

6. 新建project,batch job以及data flow

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

7. 拖动左下角刚刚新建的xml schema到data flow的设计界面,并且选择Make XML File Source

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

指定xml文件的位置:

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

这时,在data flow的设计界面中,我们可以查看xml源文件中的数据信息:

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

8. 创建unnest的query transform,并与xml源文件进行连接

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

9. 双击Unnest,进入Unnest的设计界面

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

将bookstore_nt_1拖动到Unnest下:

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

选择Unnest中的bookstore_nt_1,并设为Make Current

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

再次选中,Unnest with sub-schemas

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

返回data flow界面

 

10. 新建一个query transform

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

双击query,进入设计界面:

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

为query新建一个自动生成主键列:

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

拖动左侧Unnest的列到query中:

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

 

 

新建一个输出列,用于显示full name,即first name + last name

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

为新建的列指定计算公式:

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

 

11. 新建一个指向HANA的template table,并与query连接

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

12. 执行job:

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

查看job状况:

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

13 在data flow中查看导入的结果数据

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)

14. 在SAP HANA中查看导入的数据

[Step By Step]使用SAP Business Objects Data Services将XML数据导入到SAP HANA中(XML XSD Schema)