5

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.

qujck
  • 14,388
  • 4
  • 45
  • 74
user1021822
  • 59
  • 1
  • 4
  • 9

3 Answers3

4

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).

Maciejg
  • 3,088
  • 1
  • 17
  • 30
2

Run the mapping in test mode. In test mode, no data is inserted/updated in target tables. But you will still get the SQL queries from session log.

To enable test mode, go to the properties tab of the session and check the "Enable Test Load" option. You can leave the "Number of rows to test" value to 1 (default).

Samik
  • 3,435
  • 2
  • 22
  • 27
-1

I think that is not possible in Informatica PowerCenter.

jrara
  • 16,239
  • 33
  • 89
  • 120
  • We can very well do it I believe as mentioned above by Maciejg. Did I figure out the question properly? – Raja Reddy Dec 11 '13 at 07:31
  • Well, yes, we can get SQL SELECT statements against the databases (SQ and LOOKUP), but not the INSERT statements without running the actual mappings. INSERT statements are also SQL statements... – jrara Dec 11 '13 at 08:22
  • If you want insert statements, you'd need to use Pushdown Optimization. There you can get full insert-select statements, in the preview. So this is also possible. – Maciejg Mar 08 '23 at 10:31
  • pls mail me at gameroy007@gmail . I can send you my requirement. You can whats app me too. – Koushik Roy Mar 08 '23 at 10:38