Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] How to create a new Metadata Component for SWIFT?

Hi,
I need to parse the SWIFT messages to our readable format, and similarly generate the SWIFT messages from the existing data we have.
I guess, as of now Talend does not support the SWIFT message parsing.
So, If we have to create a new component for parsing the SWIFT message what would be the best approach?
I think under "Repository" we can have an additional component called "File SWIFT" which would do the above job.
Could you please help me in creating a new component "File SWIFT".
Any guidance regarding this is highly appreciated.

SWIFT - Society for Worldwide Interbank Financial Telecommunication
Thank you
Achyuth
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi Shong,
Sure with pleasure.
This is what i tried. This might look a bit confusing, but it is really not. Please reply to the post if you face any difficulty.
STEPS
1) Get the API for swift message parsing (WIFE)
Download the required APIs for parsing SWIFT message http://www.prowidesoftware.com/en/download.html
2) Configure External Routine in Talend using WIFE API
2.1) Create the Routine
2.2) Attach the WIFE API Library files to the Routine (Refer image-1)
2.3) Write the custom routine code by calling the API methods as per the requirement (Sample code below)
Sample custom routine code
-----------------------------------------------------------------------------------------------------------
public static Map<String, Object> fieldParser(String fin){
Map<String, Object> fieldMappings = new HashMap<String, Object>();
try {
SwiftMessage m = (new ConversionService()).getMessageFromFIN(fin);
Field32A f = new Field32A(m.getBlock4().getTagValue("32A"));
fieldMappings.put("Field32A", f.getComponent1());
fieldMappings.put("BlockCount", m.getBlockCount());

} catch (Exception e) {
e.printStackTrace();
}
return fieldMappings;
}
-----------------------------------------------------------------------------------------------------------
3) Create job (Refer Image-2)
3.1) Parse the SWIFT message file
3.2) Call the java routine code for parsing the messages
3.3) Perform the required mappings
3.4) Save the parsed attribute values to Database/File

Sample SWIFT Message
-----------------------------------------------------------------------------------------------------------
{1:F01BANKDEFMAXXX2039063581}{2 0683p000009MA5A.png1031609050901BANKDEFXAXXX89549829458949811609N}{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
:71A 0683p000009M9p6.pngHA
:71F:EUR12,00
:71F:EUR2,34
-}";
-----------------------------------------------------------------------------------------------------------

View solution in original post

9 Replies
Anonymous
Not applicable
Author

Hi
I know you have parsed the SWIFT file by creating custom routine. Would you like to share the routine or component on Talend exchange?
Best regards
Shong
Anonymous
Not applicable
Author

Hi Shong,
Sure with pleasure.
This is what i tried. This might look a bit confusing, but it is really not. Please reply to the post if you face any difficulty.
STEPS
1) Get the API for swift message parsing (WIFE)
Download the required APIs for parsing SWIFT message http://www.prowidesoftware.com/en/download.html
2) Configure External Routine in Talend using WIFE API
2.1) Create the Routine
2.2) Attach the WIFE API Library files to the Routine (Refer image-1)
2.3) Write the custom routine code by calling the API methods as per the requirement (Sample code below)
Sample custom routine code
-----------------------------------------------------------------------------------------------------------
public static Map<String, Object> fieldParser(String fin){
Map<String, Object> fieldMappings = new HashMap<String, Object>();
try {
SwiftMessage m = (new ConversionService()).getMessageFromFIN(fin);
Field32A f = new Field32A(m.getBlock4().getTagValue("32A"));
fieldMappings.put("Field32A", f.getComponent1());
fieldMappings.put("BlockCount", m.getBlockCount());

} catch (Exception e) {
e.printStackTrace();
}
return fieldMappings;
}
-----------------------------------------------------------------------------------------------------------
3) Create job (Refer Image-2)
3.1) Parse the SWIFT message file
3.2) Call the java routine code for parsing the messages
3.3) Perform the required mappings
3.4) Save the parsed attribute values to Database/File

Sample SWIFT Message
-----------------------------------------------------------------------------------------------------------
{1:F01BANKDEFMAXXX2039063581}{2 0683p000009MA5A.png1031609050901BANKDEFXAXXX89549829458949811609N}{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
:71A 0683p000009M9p6.pngHA
:71F:EUR12,00
:71F:EUR2,34
-}";
-----------------------------------------------------------------------------------------------------------
Anonymous
Not applicable
Author

Hi
Very cool! Thanks for your sharing!
Best regards
Shong
_AnonymousUser
Specialist III
Specialist III

Hi Achyuth,
this is really cool, i have been trying to do the same thing when i came across your post, but i still cant get it to work; please can you send me some more detail (cant see the pictures on the site) or even an export file would be most appreciated.
regards AvO
Anonymous
Not applicable
Author

Hi AchyuthB,
Could you please share images in your post. I also seem not to get it work.
regards
xsiyez
Anonymous
Not applicable
Author

Hi there
does anyone implemented this solution? I can't find those images ...
thanks
gtaware
Contributor
Contributor

Hi ,

 

If Anyone implemented this please guide .

 

Regards,

Ganesh Taware 

gtaware
Contributor
Contributor

Hi All ,

We have similar requirement in which we have to read MT940 files and pass it to oracle database . Can you please help me on that ? 

 

Regards,

Ganesh Taware 

KhalilAmk
Contributor
Contributor

if anyone implement a transformation of a swift file?