Process SQL-files on a database connector

Dear Dmitry,

Currently I have a program that reads in SQL-files and executes them on the Oracle database.
Now, I was thinking to model this in easyMorph.

I think I need to:

  1. Create a connection to the database => this is already OK.
  2. Then I have to be able to import my SQL text files that hold the query (1 file for each query).
  3. Then I need to create a project parameter for each SQL-file (= query)
  4. Afterwards, I can add the parameter to the connector object as a custom SQL statement.
  5. Then I need to create a second easyMorph project to iterate over the files.

Currently I does not work because I cannot find a possibility to create project parameters dynamically based on the number of SQL-files in my folder.

Could you do a suggestion of how to solve this ?

Thanks !

In version 3.8 we’ve added the ability to read SQL query from file (see below). Notice that the file name can be specified using a parameter.
image
Therefore, you can have a master project that generates a list of SQL files to execute. If the SQL files should be executed on different connectors, you can calculate connector name for each SQL file. Then iterate across the list passing the path to SQL file, and connector name to a child project that would run the query.