Table of Contents

Search

  1. Preface
  2. Informatica Developer
  3. The Model Repository
  4. Searches in Informatica Developer
  5. Connections
  6. Physical Data Objects
  7. Flat File Data Objects
  8. Logical View of Data
  9. Viewing Data
  10. Application Deployment
  11. Application Patch Deployment
  12. Application Patch Deployment Example
  13. Continuous Integration and Continuous Delivery (CI/CD)
  14. Object Import and Export
  15. Appendix A: Data Type Reference
  16. Appendix B: Keyboard Shortcuts
  17. Appendix C: Connection Properties

Developer Tool Guide

Developer Tool Guide

PreSQL and PostSQL Commands

PreSQL and PostSQL Commands

You can create SQL commands in a customized data object or relational data object instance. You can run the SQL commands to execute SQL statements such as insert, update, and delete. The Data Integration Service runs the SQL commands against the source relational resource.
When you run the mapping, the Data Integration Service runs PreSQL commands against the source database before it reads the source. You might want to use a PreSQL command if you have to update the source before you use the source in the mapping. For example, you can configure a PreSQL command to delete records in the source and update the source to load the latest records in the source database. When you run the mapping, the source that the mapping uses contains the latest records.
The Data Integration Service can also run PostSQL commands against the source database after it writes to the target. For example, you might want to use a PostSQL command to delete the records in the source after the records are loaded to the mapping target. You can configure a PostSQL command to delete the records after the mapping writes to the target.
Use the following guidelines when you configure PreSQL and PostSQL commands:
  • Use any command that is valid for the database type. The Data Integration Service does not allow nested comments, even though the database might allow them.
  • Use a semicolon (;) to separate multiple statements. The Data Integration Service issues a commit after each statement.
  • The Data Integration Service ignores semicolons within /* ... */.
  • If you need to use a semicolon outside comments, you can escape it with a backslash (\). When you escape the semicolon, the Data Integration Service ignores the backslash, and it does not use the semicolon as a statement separator.
  • The Developer tool does not validate the SQL in a PreSQL and PostSQL commands.

0 COMMENTS

We’d like to hear from you!