0% found this document useful (0 votes)
4K views

Creating Parameter File - Dynamic

Uploaded by

thilokutti
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4K views

Creating Parameter File - Dynamic

Uploaded by

thilokutti
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Creating dynamic parameter files

Applies to:
Informatica PowerCenter

Summary
This article provides an example to dynamically create parameter files for workflows, worklets or sessions.

Author Bio
Author(s): Matthias Urech
Company: interface-development.com
Created on: January 5, 2009

Matthias Urech, founder and project leader of interface - development.com, has a proven track
record of applying data integration solutions for several companies across the industry. He
played a key role to implement projects in the area of data integration, data migration, data
consolidation and data warehousing.

Matthias contributed several articles about data integration best practices for Informatica
Technology Network, resulting in nomination as member of developer wall of fame and
receiving an award as contributor of the year in 2008.

Table of Contents
Introduction .........................................................................................................................................................2
Solution Overview...............................................................................................................................................2
Solution Details ...................................................................................................................................................2
Source .........................................................................................................................................................................3
Expression ...................................................................................................................................................................4
Normalizer....................................................................................................................................................................4
Filter.............................................................................................................................................................................5
Target ..........................................................................................................................................................................5
Output ..........................................................................................................................................................................6
Disclaimer and Liability notice ............................................................................................................................7

Informatica Technology Network http://technet.informatica.com


© 2009 Informatica Corporation. All Rights Reserved. 1
Creating dynamic parameter files

Introduction
I’ve roughly outlined the possibility to create dynamic parameter files in one of my articles about the
Normalizer (see “What is the Normalizer good for anyway?”). This article provides now a more detailed
solution. Before we dive into detail, let me first give you a short summary about parameter file types.
You can use two parameters file types with Informatica PowerCenter:

• Static Parameter Files are created once and are changed manually from time to time (i.e. once a
month). Basically, you are using a tool (i.e. Parameter File Wizard) or text editor to modify the
parameters and variables.

• Dynamic Parameter Files are changing permanently, so you can’t or don’t want to change them
continuously (i.e. date values). This example describes how you can generate a dynamic parameter file
that provides date values for file names.

Solution Overview
The provided solution allows you to generate the following information:
• Workflow Variables
• Worklet Variables
• Source and Target File Names
• Mapping Parameters and Variables
• Mapplet Parameters and Variables

The solution reads the required values from a tab delimited file and generates date stamps (if needed) in any
supported date format. Moreover, empty input values will be ignored and will not be visible in the parameter
file. The example is provided “AS IS” and can be modified to fit your personal needs. Therefore, consider it
as a basic example that gives you the opportunity to learn how you can generate dynamic parameter files.

Solution Details
In this section we will have a closer look at:
• Source
• Expression
• Normalizer
• Filter
• Target

Figure 1 illustrates the interface.

Figure 1: Mapping to generate parameter files

Informatica Technology Network http://technet.informatica.com


© 2009 Informatica Corporation. All Rights Reserved. 2
Creating dynamic parameter files

Source
The Source file has the following data definition:

Figure 2: Data Definition of Source

Informatica Technology Network http://technet.informatica.com


© 2009 Informatica Corporation. All Rights Reserved. 3
Creating dynamic parameter files

Expression
Expression transformation EXP_BUSINESS_RULES holds the logic for creating the required format of the
parameter file:

Information Expression
Heading Format '[' || FOLDER || '.WF:' || WORKFLOW || IIF(ISNULL(WORKLET_SESSION), '', '.WT:'
|| WORKLET_SESSION) || '.ST:' || SESSION || ']'
Worflow Variable WORKFLOW_VARIABLE_NAME || '=' || IIF(ISNULL(WORKFLOW_TIME_FORMAT),
'', TO_CHAR(SYSDATE, WORKFLOW_TIME_FORMAT)) ||
WORKFLOW_VARIABLE_VALUE
Worklet Variable WORKLET_VARIABLE_NAME || ‘=’ || IIF(ISNULL(WORKLET_TIME_FORMAT), '',
TO_CHAR(SYSDATE, WORKLET_TIME_FORMAT)) || WORKLET_VARIABLE_VALUE
Source File Name '$InputFile1=' || SOURCE_DIR || SOURCE_NAME ||
IIF(ISNULL(SOURCE_TIME_FORMAT), '', TO_CHAR(SYSDATE,
SOURCE_TIME_FORMAT)) || SOURCE_TYPE)
Target File Name '$OutputFile1=' || TARGET_DIR || TARGET_NAME ||
IIF(ISNULL(TARGET_TIME_FORMAT), '', TO_CHAR(SYSDATE,
TARGET_TIME_FORMAT)) || TARGET_TYPE)
Mapping Parameter PARAMETER_NAME || '=' || PARAMETER_VALUE
Mapplet Parameter MAPPLET_NAME || '.' || MAPPLET_PARAMETER_NAME || '=' ||
MAPPLET_PARAMETER_VALUE

Table 1: Logic used in Expression transformation

Normalizer
The following settings are used in Normalizer transformation NRM_NORMALIZE_DATA to transpose the
data:

Figure 3: Settings of Normalizer transformation

Informatica Technology Network http://technet.informatica.com


© 2009 Informatica Corporation. All Rights Reserved. 4
Creating dynamic parameter files

Filter
Filter transformation FIL_EMPTY_VALUES ensures that empty source entries will not be written to the target
file. The Filter transformation has the following properties:

Figure 4: Settings of Filter transformation

Target
The Target file has the following data definition:

Figure 5: Data Definition of Target

Informatica Technology Network http://technet.informatica.com


© 2009 Informatica Corporation. All Rights Reserved. 5
Creating dynamic parameter files

Output
Create a workflow and a session. The following output will be produced by running the workflow:

Figure 6: Generated parameter file

Informatica Technology Network http://technet.informatica.com


© 2009 Informatica Corporation. All Rights Reserved. 6
Creating dynamic parameter files

Disclaimer and Liability notice


Informatica offers no guarantees and assumes no responsibility or liability of any type with respect to the
content of this software asset, including any liability resulting from incompatibility between the content within
this asset and the materials and services offered by Informatica. You agree that you will not hold, or seek to
hold, Informatica responsible or liable with respect to the content of this software asset.

Informatica Technology Network http://technet.informatica.com


© 2009 Informatica Corporation. All Rights Reserved. 7

You might also like