cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Help

umesh_badveli
Participant
0 Kudos

Hi All,

I have one requirement where I need to split the records based on field how can I achieve this requirement

example :

input : A B C D

           x 1 y z

           z 2 z z

           z 3 z z

           x 1 x w

           x 1 x X

           y 2 z z

If B=1 then i need to pass all the records of the column

if B=2 then i need to pass all the records of the column

if B= other than 1,2 then i suppress the records in mapping level

it should generate 2 output files for when B=1 and B=2

output(B=1): x 1 y z

                   x 1 x w

                    x 1 x X

output(B=2): z 2 z z

                    y 2 z z

note: file will contain records of B=1 and B=2 and other than this values also .

Please Help on this Requirement

Regards

Umesh

Accepted Solutions (1)

Accepted Solutions (1)

former_member182412
Active Contributor
0 Kudos

Hi Umesh,

You just repeat the target node ReceiverData using duplicate subtree and do the below mapping for first ReceiverData node.

Note: sort function sort order is descending.

Second ReceiverData node mapping. Note: sort function sort order is descending.

Regards,

Praveen.

umesh_badveli
Participant
0 Kudos

Hi Praveen ,

Thanks for your quick reply

I need to generate two output files at a time for one input file .

If B=1 then I need First output fie .exp: B1.txt

if B=2 then I need  Second output file .exp: B2.txt

Regards

Umesh

former_member182412
Active Contributor
0 Kudos

Yes you can change the receiver occurrence to unbounded in the signature tab

umesh_badveli
Participant
0 Kudos

Hi Praveen

I tried as you suggested but in Second ReceiverData node mapping I am getting Suppress

Any logic I am Missing?

former_member182412
Active Contributor
0 Kudos

Hi Umesh,

You missed sort function before collapseContext function

Note: sort function sort order is descending.

Regards,

Praveen.

umesh_badveli
Participant
0 Kudos

Hi Praven

Now I am able to do that mapping as you suggested  but now small change in condition

if B=2 and 3 I need to generate the second output file ,I am tried with 'AND' function but not getting output .

Can you  help me ?

Regards

Umesh

former_member182412
Active Contributor
0 Kudos

Hi Umesh,

You need to use OR instead of AND.

Regards,

Praveen.

umesh_badveli
Participant
0 Kudos

Hi Praveen

Thanks for logic .

but when I am activating Operation mapping it is giving error

this is error because of  duplicate sub tree .can you help me please

Regards

Umesh

former_member182412
Active Contributor
0 Kudos

IN the operation mapping did you change the occurrence of receiver interface to unbounded?

umesh_badveli
Participant
0 Kudos

Hi Praveen ,

Now is ESR part is complete ,coming to ID Part how maintain FCC parameter for that structure,

Present I am Configuring  FCC with Message type  when I take the payload that structure is relate to Sender Message but in Message Mapping Structure is different bcz of target occurrence 0-unbound .

Is there any parameters  is need to add in FCC?

Regards

Umesh

former_member182412
Active Contributor
0 Kudos

Hi Umesh,

FCC configuration is normal, only in the mapping you can see those additional Message structure, you can do normal FCC, if you still not clear you can let me know.

Regards,

Praveen.

umesh_badveli
Participant
0 Kudos

Hi Praveen

Please find below error screen shot, FCC configuration and Message type structure of pay load generated for fcc and MM structure

Regards

Umesh

former_member182412
Active Contributor
0 Kudos

Hi Umesh,

You need to place the source payload with xml declaration between message1 tags like below then you can test the mapping.

Regards,

Praveen.

umesh_badveli
Participant
0 Kudos

I am getting error in message log

is there any problem with this extra xml tags.

Regards

umesh

umesh_badveli
Participant
0 Kudos

Hi Praveen

Now I am able to see the split in message log but I have not received at receiver folder

any parameters I need to set in receiver channel here also I am using FCC

former_member182412
Active Contributor
0 Kudos

Did you check the status of the other two messages which created? is it successful? check the status of split messages

umesh_badveli
Participant
0 Kudos

Thanks praveen now I can two message in receiver folder .its authentication problem

More question can I do dynamic configuration for time stamp ?

if yes please give me some inputs, to which root node I need to map (Dynamic timestamp UDF)

I tried with udf mapping to top node of receiver data type which is 'message'

but one poll interval its is generating one output file ,message log it showing two fine are generated  .with out dynamic time stamp  its working fine .

please suggest me

Regards

Umesh

former_member182412
Active Contributor
0 Kudos

Hi Umesh,

Do you want separate time stamp for both files then select add time stamp to file name check box in the SFTP receiver channel.

Do close the thread as per this blog

Regards,

Praveen.

umesh_badveli
Participant
0 Kudos

but we have separate time stamp formate that's why I am using  dynamic time stamp .

if I use Dynamic I am not getting two file.

if I use add time stamp to file name check box in the SFTP receiver channel,I am getting two file

File formate is : filename.yyyymmdd.pay001.txt

Can you help me ?

Regards

Umesh

former_member182412
Active Contributor
0 Kudos

Hi Umesh,

You need to do as per my blog

Regards,

Praveen.

umesh_badveli
Participant
0 Kudos

Thanks a lot Praveen.

I will follow your blog,I will complete that time stamp also .

Regards

Umesh

Answers (1)

Answers (1)

former_member186851
Active Contributor
0 Kudos

Hello Umesh,

Try mapping like below to the root and rest all fields one-one.

Input-----------Equals----------Constant A----

                                                                    |And|--------------CreateIF---------Root Note.

Input-----------Equals----------Constant B----