Hi, I'm Ask INFA!
What would you like to know?
ASK INFAPreview
Please to access Ask INFA.

Table of Contents

Search

  1. Preface
  2. Working with Transformations
  3. Address Validator Transformation
  4. Aggregator Transformation
  5. Association Transformation
  6. Bad Record Exception Transformation
  7. Case Converter Transformation
  8. Classifier Transformation
  9. Cleanse transformation
  10. Comparison Transformation
  11. Custom Transformation
  12. Custom Transformation Functions
  13. Consolidation Transformation
  14. Data Masking Transformation
  15. Data Masking Examples
  16. Decision Transformation
  17. Duplicate Record Exception Transformation
  18. Dynamic Lookup Cache
  19. Expression Transformation
  20. External Procedure Transformation
  21. Filter Transformation
  22. HTTP Transformation
  23. Identity Resolution Transformation
  24. Java Transformation
  25. Java Transformation API Reference
  26. Java Expressions
  27. Java Transformation Example
  28. Joiner Transformation
  29. Key Generator Transformation
  30. Labeler Transformation
  31. Lookup Transformation
  32. Lookup Caches
  33. Match Transformation
  34. Match Transformations in Field Analysis
  35. Match Transformations in Identity Analysis
  36. Merge Transformation
  37. Normalizer Transformation
  38. Parser Transformation
  39. Rank Transformation
  40. Router Transformation
  41. Sequence Generator Transformation
  42. Sorter Transformation
  43. Source Qualifier Transformation
  44. SQL Transformation
  45. Using the SQL Transformation in a Mapping
  46. Stored Procedure Transformation
  47. Standardizer Transformation
  48. Transaction Control Transformation
  49. Union Transformation
  50. Unstructured Data Transformation
  51. Update Strategy Transformation
  52. Weighted Average Transformation
  53. XML Transformations

Transformation Guide

Transformation Guide

Understanding Error Rows

Understanding Error Rows

The Integration Service returns row errors when it encounters a connection error or syntax error. The SQL transformation has the following default ports to output error text:
  • SQLError.
    Returns database errors when the SQL transformation runs in query mode.
  • ScriptError.
    Returns database errors when the SQL transformation runs in script mode.
When the SQL query contains syntax errors, the error port contains the error text from the database. For example, the following SQL query generates a row error from an Oracle database:
SELECT Product_ID FROM Employees
The Employees table does not contain Product_ID. The Integration Service generates one row. The SQLError port contains the error text in one line:
ORA-0094: “Product_ID”: invalid identifier Database driver error... Function Name: Execute SQL Stmt: SELECT Product_ID from Employees Oracle Fatal Error
When a query contains multiple statements, and you configure the SQL transformation to continue on SQL error, the SQL transformation might return rows from the database for one query statement, but return database errors for another query statement. The SQL transformation returns any database error in a separate row.
When you configure a pass-through port or the NumRowsAffected port, the SQL transformation returns at least one row for each source row. When a query returns no data, the SQL transformation returns the pass-through data and the NumRowsAffected values, but it returns null values in the output ports. You can remove rows with null values by passing the output rows through a Filter transformation.
The following tables describe the output rows that the SQL transformation returns based on the type of query statements.
The following table describes the rows the SQL transformation generates for UPDATE, INSERT, or DELETE query statements:
NumRowsAffected Port or Pass-Through Port Configured
SQLError
Rows Output
Neither port configured.
No
Zero rows.
Neither port configured.
Yes
One row with the error in the SQLError port.
Either port configured.
No
One row for each query statement with the NumRowsAffected or the pass-through column data.
Either port configured.
Yes
One row with the error in the SQLError port, the NumRowsAffected port, or the pass-through port data.
The following table describes the number of output rows the SQL transformation generates for SELECT statements:
NumRowsAffected Port or Pass-Through Port Configured
SQLError
Rows Output
Neither port configured.
No
Zero or more rows, based on the rows returned from each SELECT statement.
Neither port configured.
Yes
One row greater than the sum of the output rows for the successful statements. The last row contains the error in the SQLError port.
Either port configured.
No
One or more rows, based on the rows returned for each SELECT statement:
  • If NumRowsAffected is enabled, each row contains a NumRowsAffected column with a value zero.
  • If a pass-through port is configured, each row contains the pass-through column data. When the query returns multiple rows, the pass-through column data is duplicated in each row.
Either port configured.
Yes
One or more rows, based on the rows returned for each SELECT statement. The last row contains the error in the SQLError port:
  • When NumRowsAffected is enabled, each row contains a NumRowsAffected column with value zero.
  • If a pass-through port is configured, each row contains the pass-through column data. When the query returns multiple rows, the pass-through column data is duplicated in each row.
The following table describes the number of output rows the SQL transformation generates for DDL queries such as CREATE, DROP, or TRUNCATE:
NumRowsAffected Port or Pass-Through Port Configured
SQLError
Rows Output
Neither port configured.
No
  • Zero rows.
Neither port configured.
Yes
  • One row that contains the error in the SQLError port.
Either port configured.
No
  • One row that includes the NumRowsAffected column with value zero and the pass-through column data.
Either port configured.
Yes
  • One row with the error in the SQLError port, the NumRowsAffected column with value zero, and the pass-through column data.

0 COMMENTS

We’d like to hear from you!