Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mapping Parameters

Status
Not open for further replies.

kpmINFO

IS-IT--Management
Apr 1, 2004
77
0
0
US
I would like to know how I can reset mapping variables.
I declared a variable to count number of rows for the session, once the session is done I would like to reset it to the initial value. Please help me with this.

 
Below is my understanding -- if it is wrong then I like to know that it is wrong.

Let's say you have a mapping variable $$RowKount and you have an entry in the parameter file like:
$$RowKount=0
then the $$RowKount variable will be initialized to 0 for the each session using the parameter file. Looks like this is what you want.

You have to delete that entry from the parameter file for Informatica to keep the end of previous session value. That is not what you want.

Do I have this correct?
 
No, I want to reset the variable to its initial value, ie the initial value that I gave when I declare it.
 
Let me try to make this discussion on more concrete terms.

Let's say the mapping variable is $$RowKount.
Let's say you want to reset or initialize $$RowKount to 0 every time you start a session.

You can put an entry
$$RowKount=0
in the parameter file you start the session with.
Then the $$RowKount variable is initialized to 0 every session.

Are you saying this is not how it works?
 
Agreed ,That's the way to reset and initialize it using the parameter, What i wanted originally was i need a mapping variable which i can use it in between transformations , but after going through the documentation i had learned that mapping variable would be change only after the session runs and only in the next run do we get to use those values.. Please let me know if this correct

Thnaks,
KPMINFO
 
Yes, that is correct. The only way to achieve what you want is to encapsulate all the logic within a single expression and use expression variables.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top