Can we specify a partition as a type in the input card?

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
Gokul
Participant
Posts: 74
Joined: Wed Feb 23, 2005 10:58 pm
Location: Mumbai

Can we specify a partition as a type in the input card?

Post by Gokul »

One of the Arguments of the functional map is

EITHER(VehicleRecordGDS CLASS2_VER1:VehicleRecordChoiceGDS:VehicleRecordChoiceGDS2<>VehicleGDSTech2Main:DealerGroup:DEALER_FILE, VehicleRecord CLASS2_VER1:VehicleRecordChoice:VehicleRecordChoice2<>VehicleGDSTech2Main:DealerGroup:DEALER_FILE).

I have a partition & 2 groups in the partition. I am mentioning one record from one group & the other from the 2nd group which are under the partition as the arguments in the EITHER function.
I need to have those groups in the functional map, where I am mapping the output.

For this can I include that partition as its type in the input card?
This is throwing an error saying "does not match type of the input card".
rep
Participant
Posts: 82
Joined: Tue Jun 19, 2007 8:04 am
Location: New York City

Re: Can we specify a partition as a type in the input card?

Post by rep »

I have a map, one input file, which comes from one company, multiple locations. All of a sudden, they flip a switch on two of the locations which alters the format, so now I'm getting two formats for one map.

I alter the type tree to include a partition; one for the original format, one for the new.

In the map before the new format, it used to have one functional map. Now that I have two possible formats, I need a partition for those two types.

Rather then just say either pass this record or this record to a functional map, I need two functio nal maps;

=EITHER(F_ADf_Mapping(TelefloraDetailRecord:TelefloraFile<>TeleFloraOldNew:Teleflora_File_Input),
F_ADf_NewLabel(TelefloraDetailRecordOrg:TelefloraFileOrg<>TeleFloraOldNew:Teleflora_File_Input))

You can not create a functional map and say "this is my input type", then pass it a different input type. You need to build a functional map for each of your input, unless the input is the same type. That is why you are getting that message. Imagine I build a functional map with an X12 interchange as my input, then I change the map rule I used to create the f_map to pass just a record in the interchange. It's tell you that is built the f_map with this format in mind, but now you're trying to pass a different format.

When you read your input, could the current record you're reading be of either type? Are the two input records mixed in your input?
Post Reply