How do you track rejected records in Informatica?

Tracking rejected records in Informatica is crucial for data quality and troubleshooting. Here's a breakdown of the methods and best practices:

1. Reject Files (Session-Level) :

  • Configuration:
    • In the session properties, you can configure Informatica to generate reject files.
    • These files capture rows that fail to be written to the target database.
    • You can specify the directory and file name for the reject files.
  • Content:
    • Reject files typically contain the rejected row data and an error message indicating the reason for the rejection.
  • Usage:
    • Review reject files to identify data quality issues, data type mismatches, constraint violations, or other errors.
    • Use the information in the reject files to correct the data and reprocess it.


2. Update Strategy Transformation (Mapping-Level) :

  • DD_REJECT:
    • Use the DD_REJECT option in the Update Strategy transformation to explicitly mark rows for rejection based on specific conditions.
    • This allows you to implement custom data validation logic within your mappings.
  • Error Handling Logic:
    • Combine the Update Strategy transformation with other transformations (e.g., Router, Expression) to create comprehensive error handling logic.
    • For example, you can route rejected rows to a separate target table for analysis.


3. Error Functions (Transformation-Level) :

  • Error Detection:
    • Use Informatica's built-in error functions (e.g., ISNULL, IS_NUMBER, ERROR) within transformations to detect data quality issues.
  • Error Logging:
    • Use the ERROR function to generate custom error messages and log them to session logs or target tables.
  • Conditional Processing:
    • Use error functions in combination with router transformations, to send error rows down a specific path.


4. Session Logs (Session-Level) :

  • Detailed Information:
    • Session logs contain detailed information about session execution, including error messages and warnings.
  • Error Analysis:
    • Review session logs to identify errors that occurred during session execution.
    • Use the error messages to troubleshoot issues and identify the root cause of rejections.


5. Target Error Tables (Mapping-Level) :

  • Dedicated Error Tables:
    • Create dedicated target tables to store rejected records and error information.
    • This provides a structured and persistent way to track rejected data.
  • Error Details:
    • Include columns in the error tables to capture relevant error details, such as error codes, messages, timestamps, and source row data.
  • Reporting and Analysis:
    • Use the error tables to generate reports and analyze data quality trends.


Best Practices :

  • Implement Comprehensive Error Handling: Design mappings and workflows with robust error handling logic.
  • Use Descriptive Error Messages: Provide clear and informative error messages to facilitate troubleshooting.
  • Log Error Details: Capture relevant error details to enable thorough analysis.
  • Automate Error Monitoring: Implement automated monitoring and alerting to detect and respond to errors promptly.
  • Regularly Review Error Data: Regularly review rejected records and error logs to identify and address data quality issues.
  • Use Data Profiling: Profile the data before loading, to find possible errors before the load occurs.

By implementing these strategies, you can effectively track and manage rejected records in Informatica, ensuring data quality and minimizing data loss.