- 1 year ago
How to trigger an Informatica workflow from a windows batch file (.bat)
To trigger an Informatica workflow from a Windows batch file (.bat), you can use the pmcmd command-line utility provided by Informatica. The pmcmd utility allows you to manage and control Informatica workflows from the command line.
Here's an example of how you can trigger an Informatica workflow from a Windows batch file:
Open a text editor and create a new file. Save it with a .bat extension (e.g.,
trigger_workflow.bat
).In the batch file, you need to write the pmcmd command with the appropriate parameters. Here's a basic example:
batch@echo off
set INFA_HOME=C:\Informatica\PowerCenter\10.4.1
set INFA_DOMAIN=MyInformaticaDomain
set INFA_REPO=MyRepository
set INFA_USER=admin
set INFA_PASSWORD=password
set WORKFLOW_NAME=MyWorkflow
cd /d %INFA_HOME%\server\bin
pmcmd startworkflow -sv %INFA_DOMAIN% -d %INFA_REPO% -u %INFA_USER% -p %INFA_PASSWORD% -f %WORKFLOW_NAME%
Make sure to replace the following placeholders with your actual values:
%INFA_HOME%
: Specify the path to your Informatica installation directory.%INFA_DOMAIN%
: Provide the name of your Informatica domain.%INFA_REPO%
: Specify the name of your Informatica repository.%INFA_USER%
and%INFA_PASSWORD%
: Provide the credentials of an Informatica user with sufficient permissions.%WORKFLOW_NAME%
: Specify the name of the workflow you want to trigger.
Save the batch file.
Double-click the batch file to execute it. This will trigger the Informatica workflow specified in the
WORKFLOW_NAME
parameter.
Note: Make sure that the Informatica services are running and the necessary environment variables are set correctly for the batch file to work properly.
By executing the batch file, the pmcmd
command will be invoked with the specified parameters, triggering the Informatica workflow and initiating its execution.