Informatica - How to Pass queries from a table to SQL Transformation and get the results

Raj V picture Raj V · Jun 26, 2014 · Viewed 7.1k times · Source

SO heres what I am trying to do. I have a table which has 2 columns - QC_Check and Query. For each QC_Check I have a query. There are several records like this.

Is there a way using SQL transformation that, I can fetch the SQL query stored in the Query column to Informatica, run the queries in Teradata and get the results stored somewhere.

Answer

Samik picture Samik · Jun 26, 2014

Although, I have not tried it myself, this should be possible using SQL transformation in Query mode with Dynamic SQL Queries. Use the table with Query column as a source. Create a SQL transformation with Query mode. Connect the Query column to the SQL transformation. enter image description here

Write ~Query_Port~ in the SQL editor in the SQL transformation:

enter image description here

If you want to capture the results from your query, you have to configure output ports for columns you retrieve from the database.