functional map runs only once

Formally known as "Mercator Inside Integrator 6.7", DataStage TX enables high-volume, complex transactions without the need for additional coding.

Moderators: chulett, rschirm

Post Reply
jackcool
Participant
Posts: 28
Joined: Thu Mar 02, 2006 6:19 pm
Location: sappington
Contact:

functional map runs only once

Post by jackcool »

I have a functional map which should be creating one output record for each occurance of input record.According to the map designer interface guide ,we just need to pass the input type that occures multiple times as argument to functional map and rest will be taken care by Tx.

Structure of my input file is
Line1 -- Occurres once
Line2 -- Occurres multiple times

something like Order + Line Item scenario.

I created types as
Order(1)
LineItemDetails(S)

I created a functional map which takes LineItemDetails as arguement.As per the documentation functional map should be called for each occurrence of Line Item ,but i dont see that happening.I see only once the functional map is called and one row is created in Database.

Am i missing something ?
jgibby
Participant
Posts: 42
Joined: Thu Dec 16, 2004 8:48 am

Post by jgibby »

Is the output card where you are calling the functional map a series object as well? It has to be for the functional map to be called multiple times.

John
jackcool
Participant
Posts: 28
Joined: Thu Mar 02, 2006 6:19 pm
Location: sappington
Contact:

Post by jackcool »

Iam not sure about whether my OutputCard is series or not ?

when you a series object do you mean multiple occurrances ?

Since my target is Database my output card is referring to a type called

LineItemDetails --->which has Row LINEITEM (S) where LINEITEM is my table name.

LineItemDetails ---> Row LINEITEM (s)
---> LINEITEM_ID
---> ITEM_NAME
---> ITEM_DESCRIPTION
jgibby
Participant
Posts: 42
Joined: Thu Dec 16, 2004 8:48 am

Post by jgibby »

Yes, by "series object" I do mean an item that can occur more than once.

So I am guessing you have something like this:

Code: Select all

InputCard
InputItems (s)
Going into:

Code: Select all

LineItemDetails
LINEITEMS (s)
---> LINEITEM_ID
---> ITEM_NAME
---> ITEM_DESCRIPTION
For this you would need to call your functional map from the LINEITEMS field in a manner something like this:

Code: Select all

=F_Build_LineItem(InputItems)
To iterate your series objects to correctly call a functional map, you need to use your input series object on an output card's series object.

I hope this helps,
John
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

What do you plan to do with the table name in LINEITEM?
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

What do you plan to do with the table name in LINEITEM?
jackcool
Participant
Posts: 28
Joined: Thu Mar 02, 2006 6:19 pm
Location: sappington
Contact:

Post by jackcool »

janhess wrote:What do you plan to do with the table name in LINEITEM?
When i generated the type tree from DB Interface Designer thats how it was generated.It created tree as

Data --> TableName--Column
Row
DBTable
jackcool
Participant
Posts: 28
Joined: Thu Mar 02, 2006 6:19 pm
Location: sappington
Contact:

Post by jackcool »

jgibby wrote: To iterate your series objects to correctly call a functional map, you need to use your input series object on an output card's series object.

I hope this helps,
John
I generated a type DBTable --> which has Row(s)
e.g.,
LINTEITEM-->DBTable --->Row(s) --->Column names

My Output card is mapped to DBTable,will this be considered a series object ?

Otherwise i have to figure out a way to make DBTable a series object.
jgibby
Participant
Posts: 42
Joined: Thu Dec 16, 2004 8:48 am

Post by jgibby »

jackcool wrote:
jgibby wrote: To iterate your series objects to correctly call a functional map, you need to use your input series object on an output card's series object.

I hope this helps,
John
I generated a type DBTable --> which has Row(s)
e.g.,
LINTEITEM-->DBTable --->Row(s) --->Column names

My Output card is mapped to DBTable,will this be considered a series object ?

Otherwise i have to figure out a way to make DBTable a series object.
You will want to call your functional map in the Row(s) element. That is your series object.
jackcool
Participant
Posts: 28
Joined: Thu Mar 02, 2006 6:19 pm
Location: sappington
Contact:

Post by jackcool »

That worked!!. i just changed the series object from DBTable to ROW(s).
Thanks alot guys.
Special Thanks to John for your help.
jgibby
Participant
Posts: 42
Joined: Thu Dec 16, 2004 8:48 am

Post by jgibby »

No problem. I'm finding I actually do learn a lot by staying on top of the forums here and at Ascential/IBM DeveloperNet. I enjoy being able to answer or help and that has kept me interested in staying involved.

Thanks,
John
Post Reply