Scriptella ETL中的Supress错误

时间:2018-08-13 13:47:15

标签: java etl scriptella

是否可以使用<onerror>

来抑制错误
                        <script connection-id="db1">
                        INSERT INTO MISSING_TABLE(MODELID) 
                        values (?new_model_id);
                        <onerror connection-id="log" >
                          Table missing ignored                          
                        </onerror>
                    </script>

不幸的是,它无法按预期运行。

  [etl] copying OPTI_IN_ATTRIBUTE
  Script /etl/query[2]/query[1]/query[68]/script[1] failed:     scriptella.jdbc.JdbcException: Unable to execute statement. Error statement: 
  INSERT INTO MISSING_TABLE(MODELID) values (?). Parameters: [955004]. Error codes: [42000, 942]
  Using onError handler: OnError{codes=[], retry=false}
  Unable to rollback transaction for connection ScriptConnection:      Transactions are not supported by ScriptConnection
  Unable to rollback transaction for connection TextConnection: Transactions are not supported by TextConnecti

最后没有回滚是可以的。

0 个答案:

没有答案