[resolved] Processing SWIFT Message

One Star

[resolved] Processing SWIFT Message

Hi,
I am trying to process the swift message. Please find the image attached.
I have added one routine called "SwiftParser" with the method "fieldParser(String fin)", which i am calling from the tJava component.
The swift message is hard-coded as of now.
My issue is that i want to read and pass the swift data to the tJava component from the file (instead of hard-coding).
I tried few way, but i am not able to do that.
Can you please help me in getting this done.

Accepted Solutions
Community Manager

Re: [resolved] Processing SWIFT Message

Hi
tFileInputFullRow is better than tFileInputPositional to read row one by one, concatenate each line in tJavaFlex and store it into a globalMap, for example:
tFileInputFullRow--main--tJavaFlex
|
onsubjobok
|
tJava

on begin part of tJavaFlex:
String line="";
on main part of tJavaFlex:
line=line+row1.line+"\n";
on end part of tJavaFlex:
globalMap.put("line", line);
on tJava:
String line=(String)globalMap.get("line");
and then, call your routine;
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

All Replies
One Star

Re: [resolved] Processing SWIFT Message

Hi,
Right now i am doing to following to achieve this. Not sure whether this is the right way. Please correct me if there is a better approach.
1) I used tFileInputPositional to read the file. I specified only one pattern, which is from the beginning of the record to end of the record.
2) Then use the tFlowToIterator to get each line one by one
3) Use tJava component to concatenate each line to one string and store it in the globalMap.
4) onSubJobOk user another tJava component to get the complete file content from the globalMap and process the record.

Sample Swift data
{1:F01BANKDEFMAXXX2039063581}{2Smiley Surprised1031609050901BANKDEFXAXXX89549829458949811609N}{3:{108:00750532785315}}{4:
:20:007505327853
:23B:CRED
:32A:050902JPY3520000,
:33B:JPY3520000,
:50K:EUROXXXEI
:52A:FEBXXXM1
:53A:MHCXXXJT
:54A:FOOBICXX
:59:/13212312
RECEIVER NAME S.A
:70:FUTURES
:71ASmiley FrustratedHA
:71F:EUR12,00
:71F:EUR2,34
-}";
Community Manager

Re: [resolved] Processing SWIFT Message

Hi
tFileInputFullRow is better than tFileInputPositional to read row one by one, concatenate each line in tJavaFlex and store it into a globalMap, for example:
tFileInputFullRow--main--tJavaFlex
|
onsubjobok
|
tJava

on begin part of tJavaFlex:
String line="";
on main part of tJavaFlex:
line=line+row1.line+"\n";
on end part of tJavaFlex:
globalMap.put("line", line);
on tJava:
String line=(String)globalMap.get("line");
and then, call your routine;
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] Processing SWIFT Message

Hi Shong,
This was better. Thank you..!! Smiley Happy
One Star

Re: [resolved] Processing SWIFT Message

Hi,
For more details please refer the below post
http://www.talendforge.org/forum/viewtopic.php?pid=62105#p62105
One Star

Re: [resolved] Processing SWIFT Message

I'm thinking of a SWIFT connector that will work with SAA via mqseries. Do you have any experience on this? Also, do you reconciliate with ack/nack's?
thanks

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog