You are on page 1of 1

Requirement:

To enable PowerCenter to read files with dynamic name with a fixed format.

Approach:
Use PowerCenter features to enable it to read files with dynamic name of fixed format.

Description:
Create a Work flow variable as “$$FileName” with string data type:

Take an assignment task and assign the wf variable with the expressions as following:

Put the below in expression:


'FileName' || '_' || SUBSTR(TO_CHAR(SYSDATE),1,2) || '_' || SUBSTR(TO_CHAR(SYSDATE),4,2) || '_' ||
SUBSTR(TO_CHAR(SYSDATE),7,4) || '.txt'

**Note: The above can be tailored according to our need.


The above expression will generate a file name like this: “FileName_mm_dd_yyyy.txt”

Now supply the Wf variable in the session as below:

The workflow will look something like below:

Result:
The Purpose is severed and now PowerCenter can read files with dynamic names of fixed format.
Author: NagarjunaReddy Kumbum Version: 1.0.0.0.0

You might also like