Database Name as a Parameter

Hi, new to EasyMorph. We are trying to figure out how to parameterize a Database Name. We will need to make workflows for different products, but each new run will be to a different database. So, how can we run a query while needing to specify the database name each time? Thanks

Clarification, I need to parameterize a Connection

You can import the database names into a table and then iterate the table into another module using the Parameter Table option in the module. As each row is passed in, you match the row with the parameter in the module and then run your query once the parameter value is received from the iteration. Check this post for more information: Need some iteration assistance - Iterate Table - #2 by dgudkov Also, check this help topic: transformations:parametertable [EasyMorph Help]

Connectors themselves can’t be parameterized in EasyMorph. You can create several connectors, one connector per database, and then the names of connectors used in actions can be parameterized.

How many databases do you need to access?

Hundreds per day. The databases would not exist when the project was created

I see, parameterized connector names won’t help in this case.

Two questions:

  • What’s your target database type (SQL Server, Postgres, etc.)?
  • How do you do it currently?

It is MSSQL. IT looks like maybe what we can do is use ODBC connections and just edit them each time


if the connector database weren’t encrypted, maybe it would be possible to insert a new connector with an EM project into the DataConnector table ?


@cvo Starting from v5.0 connector repositories are encrypted.

@wseguin let me think of a solution. I’ll get back to you.

so maybe some new features : transformations to create, change and suppress connectors.
Combined with datacatalog transformations it would allow to automatically add new datasets to datacatalog.

1 Like

It looks like for SQL Server, database names can be prepended to table names (e.g. {Database_name}.{Schema_name}.{Table_name} even if the connection was configured to another database. It works with the “Custom SQL” mode of the “Import from database” action, but we’re analyzing what would it take to support in other actions.