Dynamic SQL

Hi-- I’m a newbie and have a use case requiring a db input table query statement to be constructed at execution time. Basically, the graph would have these requirements:

  1. read table-A containing column names
  2. using these column names read table-B
  3. store extracted data of table-B data into file.

Can this be done in Clover? Thanks!

Hi Linar,
I spent considerable time to find solution of your problem in CLoverETL ;-). In attached project you can see how it can be done:

  • createQueryAndMetadata.grf - reads table A and creates query for table B. It saves the query in the file and creates metadata defined by query and database connection.

  • selectData.grf - reads data from table B.

  • getData.grf - runs both graphs. To run this graph you need to ad the cloveretl.connection.jar to the project class-path.

  • linar.zip

Thank you Agata, this is a great help.