How the Translator Works with SQL Maps
Following are some caveats about how the translator works with SQL maps:
- The translator operates in transactional mode and will roll back any database updates if the process fails.
- If the pool.Type parameter in the JDBC pool is set to “local,” the translator controls when the rollback occurs. This means that any compliance errors or errors from failed insert/update/delete statements will cause the rollback to occur.
Note: If the JDBC pool.Type parameter is set to “remote,” the database controls when rollbacks are issued. For a SQL map, it is recommended that the Type parameter be set to “local.” - To commit after each iteration, you must add the following line must be added to the translator.properties file:
commit_after_map_iteration=true
- If a full translation is complete or the commit_after_map_iteration property is set to “true” in translator.properties, and the Use transactions property is set in the map, and if the sql.noRollbackOnValidationError property in the translator.properties file is set to “false,” then the commit occurs regardless of whether translation errors exist.
- On the Input side of a map you cannot pass parameters to the query being issued. That is, you cannot pass to the query: a value from the map, a variable, or any data that is hard-coded by using constants or a codelist.
- You cannot generate a result set on the Output side of a map because you cannot use an Input record on the Output side of a map (and an Input record is the only map component able to generate a result set).
- At least one field (column) in an Output Record must be defined as a TableKey.