是否可以使用<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
最后没有回滚是可以的。