Marketplace
Python: Create and Test PowerCenter Connections

Python: Create and Test PowerCenter Connections

Posted by: Utkarsh Kumar

Python Script to create and test the connection for PowerCenter. It is supported on Windows and Linux.

Overview

In PowerCenter, after creating the connection for any relational database, we can not test immediately. We need to run a session using the connection to confirm that the connection settings are valid. Using this python script we can create a connection for Oracle, Sybase, Teradata database and immediately test it for errors. Inputs
  • Connection_settings.txt
  • The file is used to provide the information about the repository and the connection to be created. Provide the information in the format as specified in the file. Only one connection is supported per run. Unused connection types should be commented.
  • Evn_settings.txt
Running the scriptIn Windows     py mp_connection_wiz. PyIn Unix     python mp_connection_wiz.py Output
  1. The script will create the connection and display the success or failure
  2. The script will run the test workflow and display the success or failure status of the workflow
How it works?The script is packaged with a PowerCenter workflow which is imported into the repository automatically in the folder Marketplace_tool_python_connection_wiz_v1. This workflow will be run with the connection just created to test and the result is displayed. The workflow will be imported automatically when the first time the script is used against a repository, and the same workflow will be used subsequently.

Features

  • PowerCenter 9.5.1, PowerCenter 9.6.1, Python

Resources

Support