Search code examples
informatica-powercenterinformatica

Changing data source connection at runtime in an Informatica workflow


I have a mapping which I need to be able to run against multiple source schemas (having the same structure), one schema at-a-time. Given the number of schemas, I would rather not set up a session for each schema in order to specify a particular mapping connection, as that will require new sessions to be added as new schemas are added.

Is it possible to set up a workflow in such a way that the data source connection for a mapping within a session is defined (or passed in as a parameter of some sort) at run-time?


Solution

    1. Configure the workflow or the session to use a parameter file.
    2. In the session settings, change the 'hard-coded' source connection (option Use object) to Use Connection Variable and enter a variable name with a $DBConnection prefix (e.g. $DBConnectionSource01).
    3. Create a parameter file in an appropriate location with the following contents:

      [Global]
      $DBConnectionSource01=connection_name