cancel
Showing results for 
Search instead for 
Did you mean: 

MTB for converting XML to CSV and sending as an mail attachment

Former Member
0 Kudos

Hi ,

We need to convert the xml payload to csv file and send it as a mail attachment.

Below is the FCC conversion for the same .

HEADR_NODE.fieldSeparator,
HEADR_NODE.endSeparator'nl'
HEADR_NODE.fieldNamesRecord_Identifier,File_Type_Code,Originator_Id,Originator_Role,Recipient_Id,Recipient_Role,Created_Date,Created_Time,File_Identifier,File_Usage_Code,Record_Count,Transaction_Count
TRANS_NODE.fieldSeparator,
TRANS_NODE.endSeparator'nl'
TRANS_NODE.fieldNamesRecord_Identifier,Transaction_Reference,Transaction_Comment,Contract_Reference,Transaction_Type_Code,Transaction_Type_Reason_Code,Cross_Ref_Other_Internal_Job_Reference,Cross_Ref_Other_External_Job_Reference,Transaction_Status_Code,Transaction_Status_Change_Reason,Market_Sector_Code,Date_Of_Notice,Registration_Body,Registration_Reference,Effective_From_Date,Effective_To_Date
MTPNT.fieldSeparator,
MTPNT.endSeparator'nl'
MTPNT.fieldNamesRecord_Identifier,Data_Update_Code,Meter_Point_Reference_Number,Meter_Link_Code,Meter_Point_Status,Location_Code,Meter_Point_Location_Notes,Access_Instructions,Conversion_Factor,Last_Inspection_Date,Metering_Pressure
REMVE_ASSET.fieldSeparator,
REMVE_ASSET.endSeparator'nl'
REMVE_ASSET.fieldNamesRecord_Identifier,Data_Update_Code,Transaction_Type_Code,Asset_Class_Code,Product_Identifier,Payment_Method_Code,Model_Code,Manufacturer_Code,Year_of_Manufacture,Serial_Number,Location_Code,Asset_Location_Notes,Asset_Status_Code
REMVE_REGST.fieldSeparator,
REMVE_REGST.endSeparator'nl'
REMVE_REGST.fieldNamesRecord_Identifier,Data_Update_Code,Register_Type_Code,Number_of_Dials_or_Digits,Units_of_Measure,Multiplication_Factor
REMVE_READG.fieldSeparator,
REMVE_READG.endSeparator'nl'
REMVE_READG.fieldNamesRecord_Identifier,Reading_Date,Round_the_Clock,Reading_Index
INSTL_ASSET.fieldSeparator,
INSTL_ASSET.endSeparator'nl'
INSTL_ASSET.fieldNamesRecord_Identifier,Data_Update_Code,Transaction_Type_Code,Asset_Class_Code,Product_Identifier,Payment_Method_Code,Model_Code,Manufacturer_Code,Year_of_Manufacture,Serial_Number,Location_Code,Asset_Location_Notes,Asset_Status_Code,
INSTL_METER.fieldSeparator,
INSTL_METER.endSeparator'nl'
INSTL_METER.fieldNamesRecord_Identifier,Data_Update_Code,Meter_Type_Code,Meter_Mechanism_Code,Measuring_Capacity,Meter_Usage_Code,Collar_Status_Code,OAMI_Inspection_Date,Role_Code,Last_Refurbished_Date,Pulse_Value,
INSTL_REGST.fieldSeparator,
INSTL_REGST.endSeparator'nl'
INSTL_REGST.fieldNamesRecord_Identifier,Data_Update_Code,Register_Type_Code,Number_of_Dials_or_Digits,Units_of_Measure,Multiplication_Factor
INSTL_READG.fieldSeparator,
INSTL_READG.endSeparator'nl'
INSTL_READG.fieldNamesRecord_Identifier,Reading_Date,Round_the_Clock,Reading_Index
APPNT.fieldSeparator,
APPNT.endSeparator'nl'
APPNT.fieldNamesRecord_Identifier,Appointment_Qualifier_Code1,Appointment_Date_From,Appointment_Date_To,Appointment_Time_From,Appointment_Time_To
TRIAL.fieldSeparatorignore
TRIAL.endSeparator'nl'
TRIAL.fieldNamesRecord_Identifier

I just started as below ,as this is show stopper now and it is taking time for me ,so i felt experts in the forums could able to ease my work .

1)Does my requirement possible?

2)If yes could please help me out ?

Regards

Venkat

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

Thanks all for your suggestions.

I have modified the design and handled everything in mapping it self .So no need to do any thing in receiver mail channel .I actually posted this to get help on MTB .

My requirement is like below

sender side .csv file .PI Picks this file and in mapping we are using look up to get email id's based on input file name and we need to send the csv file as an attachment to mail id's that we retrieved using look up in mapping .

Regards

Venkat

Answers (2)

Answers (2)

former_member191435
Contributor
0 Kudos

Hi Venkat,

Send your structure..

Harish
Active Contributor
0 Kudos

Hi Venkat,

1)Does my requirement possible?

--> Yes your requirement is possible.

2)If yes could please help me out ?

--> you need to convert the XML to CSV using message transform bean and after that use payload awap bean to convert it to attachment.

Please provide your xml to give more inputs on message transform bean paramter.

regards,

Harish

r_s_kulkarni11
Participant