Is it possible to get the SQL that would be generated, without running the mapping?

user1021822 picture user1021822 · Dec 4, 2013 · Viewed 8.9k times · Source

We can see the SQL's generated by PowerCenter in the session log file once a mapping has been run. So to get these SQLs we have to run the mapping. I would like to know if there is any way to get the SQL that PowerCenter would generate without actually running the mapping, so that we can analyse it, fix it or apply relevant database indexes etc. in case of any issues.

If this is possible then please tell me how.

Answer

Maciejg picture Maciejg · Dec 4, 2013

You can edit the Source Qualifier, go to Properties tab and edit the SQL Query property. There you can see the Generate SQL button that will create the SQL statement. This also works for lookups where you can find the Lookup Sql Override property. Please note that this will not include the source filter (for Lookup).