Home  >  Article  >  Database  >  Kettle 生成的XML格式数据保存到Oracle 数据库的BLOB类型字段中

Kettle 生成的XML格式数据保存到Oracle 数据库的BLOB类型字段中

WBOY
WBOYOriginal
2016-06-07 15:50:512146browse

利用Kettle读取Excel表数据生成XML式数据,保存到数据库表的BLOB类型的字段中,转换脚本如下: 如果不对XML式数据进行处里,无法直接保存到数据库BLOB类型的字段中,异常如下图: Kettle 是支持LOB,BLOB和其他二进制数据库对象的,可以利用Kettle在输出步骤

利用Kettle读取Excel表格数据生成XML格式数据,保存到数据库表的BLOB类型的字段中,转换脚本如下:

Kettle 生成的XML格式数据保存到Oracle 数据库的BLOB类型字段中

如果不对XML格式数据进行处里,无法直接保存到数据库BLOB类型的字段中,异常如下图:

Kettle 生成的XML格式数据保存到Oracle 数据库的BLOB类型字段中

Kettle是支持LOB,BLOB和其他二进制数据库对象的,可以利用Kettle在输出步骤之前将XML格式数据类型由String类型转成Binary类型数据,实现XML数据保存到BLOB中。这里转换的步骤有字段选择、计算器等。

Kettle 生成的XML格式数据保存到Oracle 数据库的BLOB类型字段中

Kettle 生成的XML格式数据保存到Oracle 数据库的BLOB类型字段中

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn