Talend 类型不匹配:无法从ResultSet转换为BigDecimal
您好,我正在使用Talend 类型不匹配:无法从ResultSet转换为BigDecimal,talend,Talend,您好,我正在使用talend作业计划从一个数据库到另一个数据库的数据集成。我的工作是: tOracleInput--->tMap--->tOracleRow--->tOracleRecordSet-->tOracleOutput 在我的tOracleRow中,有一个big decimal值,我使用select查询得到: Select my_value+1 my_value from MY_TABLE where id=? 我还使用preparedStatement在一
talend
作业计划从一个数据库到另一个数据库的数据集成。我的工作是:
tOracleInput--->tMap--->tOracleRow--->tOracleRecordSet-->tOracleOutput
在我的tOracleRow
中,有一个big decimal
值,我使用select查询得到:
Select my_value+1 my_value from MY_TABLE where id=?
我还使用preparedStatement
在一个输入上传播查询
在运行作业时,我一直出现以下错误:
类型不匹配:在我的tOracleRow
组件上,无法从ResultSet转换为BigDecimal
。我最终解决了问题,我将tOracleInput、tMap、tOracleRow和tOracleRecordSet的my_值的类型设置为Object。在tOracleOutput级别,我将其设置为BigDecimal。在解析为tOracleOutput的my_值之前,tOracleRecordSet中my_值的值被强制转换为BigDecimal