Sunteți pe pagina 1din 7

Name of Solution:

Autotype Excel Macro for PowerCenter Designer

Business Requirement:
Excel based tool that helps you do repetitive tasks quickly and efficiently in PowerCenter
Designer.

Solution URL:
https://community.informatica.com/solutions/1524

Supported Versions:
PowerCenter 9.1 and 9.5

Description:
PowerCenter

developers

are

often

involved

in

creating

complex

mappings

with

transformations having multiple ports. The repetitive task of creating and re-naming ports,
defining data-types, writing logic for various ports can be tedious and error-prone.
Autotype Excel Macro extends the power of Excel to PowerCenter Designer and helps you do
repetitive tasks quickly and efficiently. Autotype Excel Macro provides following functions:

Put prefixes

Put suffixes

Delete prefixes

Delete suffixes

Create IO ports

Copy-Paste

Create Mapping Parameters and Variables

For more information, take a look at the video under demo section.
Note:

Ensure that you have enabled Macro in Microsoft Excel so that you can use this
utility. To know more about enabling Macros in Excel, click here.

It has been observed that this Macro may not work as expected on some of
the PCs. In such cases, Safe Mode version of the macro may be used.
Though it is a little slower, it gets the job done. Safe Mode can easily be
defined by changing a cell value in the downloaded Excel file.

Please rate this solution and share your feedback on Marketplace Website.

Download file contents:


1. Excel File

Steps to implement the solution:


1. Import sample mapping using the Repository Manager. Select the appropriate folder
from the repository and resolve the conflicts by choosing suitable option.
2. Open excel file and make a macro sheet as the active sheet as shown below.

3. Safe Mode
a. Execution of this tool depends on the processor. If safe mode is on then one
second delay will be inserted after every operation otherwise time duration
will be minimized to complete task. Since it has dependencies on the
processor speed safe mode = off may not work as expected.
b. Value of Cell B2 decides the safe mode setting.

0 Safe mode ON

1 Safe mode OFF

Please rate this solution and share your feedback on Marketplace Website.

4. Open mapping in mapping designer, make port tab of

transformation as a front

window as shown below.

5. Prefix
a. This feature adds/deletes prefix to the existing ports. Input values are explained
as below.
Cell

Explanation

B5

This cell value contains the number of fields are going to affect
after the add prefix operation.

B6

This cell value contains the actual text which will be added as
prefix.

E5

This cell value contains the number of fields are going to affect
after the remove prefix operation.

E6

This cell value contains the length of prefix text to be removed


from port name.

b. Go to mapping designer, keep focus on port number 12. Click on Put Prefixes
on an excel file. Check the execution without disturbing the keyboard or mouse.
Observe the result as below.

Please rate this solution and share your feedback on Marketplace Website.

c. Go to mapping designer, keep focus on port number 12. Click on Delete on an


excel file. Check the execution without disturbing the keyboard or mouse.
Observe the prefixed text has been deleted.

Suffix
a. This feature adds/deletes suffix to the existing ports. Input values are explained
as below.
Cell

Explanation

B9

This cell value contains the number of fields are going to affect
after the add suffix operation.

B10

This cell value contains the actual text which will be added as a
suffix.

E9

This cell value contains the number of fields are going to affect
after the remove suffix operation.

E10

This cell value contains the length of suffix text to be removed


from port name.

b. Go to mapping designer, keep focus on port number 17. Click on Put suffixes on
an excel file. Check the execution without disturbing the keyboard or mouse.
Observe the result as below.

Please rate this solution and share your feedback on Marketplace Website.

c. Go to mapping designer, keep focus on port number 17. Click on Delete (Suffix)
on an excel file. Check the execution without disturbing the keyboard or mouse.
Observe the suffixed text has been deleted.
6. Create IO (Input/Output port)
a. This feature adds port to the transformation. Input values are explained as
below.
Cell

Explanation

E13

This cell value contains the number of fields are going to add.

B14

This cell value contains the port type.


0 - Pass through
1 - Input
2 - Output

E15

This cell value contains the data type of fields which

will be

added. User can select a data type from the drop down list.
E16, E17

These cell values contain the precision and scale respectively.

E18

This cell value contains the default value for the field.
BLANK - for default
NONE

- if no default value should be used.

b. Go to mapping designer, keep focus on the last part (preferable but not
mandatory). Click on Create IO on an excel file. Check the execution without
disturbing the keyboard or mouse. Observe the result as below. It will add 10
ports to transformation with specified input values.

Please rate this solution and share your feedback on Marketplace Website.

7. Copy_Paste
a. This feature helps replacing port names with new values. Generating/Modifying
the name of a port in excel files is easy and faster than generating it in
PowerCenter directly. Observe the values from A21 A26. Also, note that values
C21-C26 are derived from A21-A26. Now, put the cursor on C21. Also, keep
focus on port no 20 in Mapping designer and click on Copy Paste. Observe the
execution without disturbing keyboard or mouse and observe the result as shown
below.

b. The same operation can do for expression column of the Edit transformation
window.
8. Mapping parameters sheet of excel help user to create mapping parameters.
a. Make mapping parameters sheet as active worksheet. Observe the values from
A5 to A14. Second column B decides whether parameter or variable need to be
created.
b. Open parameters and variables definition window from mapping -> Parameter
and Variable menu.

Please rate this solution and share your feedback on Marketplace Website.

c. Keep focus on the last cell of Declare Parameters and Variables and Click on
Insert Mapping Parameters. Observe the execution without disturbing mouse or
keyboard. Observe the execution and observe the result as shown below.

9. For more details of importing about tool please visit our YouTube link.

YouTube Video on Importing and Configuring Workflows:


http://www.youtube.com/playlist?list=PLLRreK2jjjgWBQ4NPfp0QWTxYDvlnEqSJ

Other Useful links:


Mapping Bundles
Workflow Bundles
Informatica Tools Bundles
Informatica for Social Media Bundles
Debugging Tools Bundles
Visio Templates Bundles
B2B Templates and Projects Bundles
Data Quality Packs and Plans Bundles
Script Bundles

Please rate this solution and share your feedback on Marketplace Website.

S-ar putea să vă placă și