You can add pre-and post-session SQL commands to the Properties tab of the Source qualifier transformation. You may want to use pre-session SQL to write the time identification row to the source table at the beginning of the session.
PowerCenter runs the pre-session SQL command against the source database before reading the source, after the session SQL command is run against the source database after the target is written.
You can override SQL commands in the Transformations view on the Mappings tab of the session properties. You can also configure PowerCenter to stop or continue before the session is run or after the session when the SQL command encounters an error.
Follow These guidelines when you enter a session before and after the SQL command in the Source qualifier transformation.
- You can use any command that is valid for the database type. However, PowerCenter Server does not support nested comments, even if the database allows it.
- Mapping parameters and variables can be used in pre-and post-session SQL commands.
- Use a semicolon (;) Separate multiple statements.
- PowerCenter Use the/* ... */comment.
- If you need to use semicolons outside of quotation marks or notes, you can avoid this by using a backslash (\). If the semicolon is escaped, PowerCenter ignores the backslash and does not use a semicolon as the statement delimiter.
- The Designer does not validate SQL.
Note: You can also enter pre-and post-session SQL commands on the Properties tab of the target instance in the map.
Informatica Common component source qualifier before and after the session SQL