IMAP Email attachments are not able load to mongodb

Four Stars

IMAP Email attachments are not able load to mongodb

Hi All,
Am loading  data from IMAP folder to Mongodb using component as ( tPOP-->tFileInputMail-->MongodbOutput ). I can load all the Mail Part column likes From, To, Subject and Body column.
But, the email attachements are not able to load to output  to mongodb or tlogrow. Please find  attached screenshot for reference.
Is it possible  attachments files can load to output (or) Am i did any mistake for loading attachments? Am using Talend BD 5.6 version.
Thanks,
Regards,
Srinivasan
Moderator

Re: IMAP Email attachments are not able load to mongodb

Hi Srinivasan,
Have you already used ((String)globalMap.get("tPOP_1_CURRENT_FILEPATH")) for the file name in tInputmail component? How did you set "Mail parts" in Basic settings of tFileInputMail?
Column           Mail part
SUBJECT          SUBJECT
ATTACHMENT   ATTACHMENT ?

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: IMAP Email attachments are not able load to mongodb

Thanks for the response.
Yes. I have used ((String)globalMap.get("tPOP_2_CURRENT_FILEPATH")) for the file name. still dont get the attachments email to the outputs.
The Column and Mail Parts used as below:
Column         Mail Parts
subject        "subject"
attachment  "attachment"
Thanks,
Four Stars

Re: IMAP Email attachments are not able load to mongodb

Hi Team,
The email attachment files cant load to Mongodb/Oracle? the  tfileinputmail component Column/Mail Part : email attachment alone is not working.
Is there any other way to load email attachments load to mongodb?
Thanks,
Moderator

Re: IMAP Email attachments are not able load to mongodb

Hi,
Can you use tPOP-->tFileInputMail-->tlogrow to print out your attachment successfully on console? How did you set Mongodb/Oracle DB schema?

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: IMAP Email attachments are not able load to mongodb

Hi xdshi
The Tlogrow component also can see the attachment as  empty. Please find attached screenshot for reference. Please help to  let me know if am wrong anywhere.

Thanks,
Regards,
Srinivasan S
Four Stars

Re: IMAP Email attachments are not able load to mongodb

Hi Sabrina,
Any updates on this please?
Thanks,
Regards,
Srinivasan S
Moderator

Re: IMAP Email attachments are not able load to mongodb

Hi Srinivasan S,
How did you set your schema in tFileInputMail? Are you sure that you got the email with attachment? What's kind of attachment?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: IMAP Email attachments are not able load to mongodb

Hi Sabrina,
I have set schema as 'String" for attachment column. i dont think  the  tfileinputmail wont send attachments  to output log row .
I can see the tpop component output directory file  below logs  for attachment file.
--_Next_Part_1381127745
Content-Type: text/plain
Content-Disposition: attachment;
  filename=s_EQIX_ORA_ODS_Param_File_Generate_1381127745.log
Content-Description: s_EQIX_ORA_ODS_Param_File_Generate_1381127745.log
Please let me know  how to get email attachments in the tfileinputmail component  to output  logrow.
Four Stars

Re: IMAP Email attachments are not able load to mongodb

Hi Sabrina,
Do you have any sample jobs for loading attachments files too? Still am facing not able to load email attachments files from TFileInputMail components to logrow output .Please help on this.
Attachments files  are just text file only.
Thanks,
Regards,
Srinivasan S
Moderator

Re: IMAP Email attachments are not able load to mongodb

Hi Srinivasan S,

We don't find that something is wrong with your job setting. Could you please send your .mail file to us so that we can make a testing for your case.

Best regards
Sabrina 
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: IMAP Email attachments are not able load to mongodb

Hi Sabrina,
Please find below .mail file conent for your testing purpose.
Return-Path: <root@xxxxxxxxxxx.sv2.corp.xxxxx.com>
Received: from xxxxxxxxxxx.sv2.corp.xxxxx.com (dev105.corp.xxxxx.com )
    by yyyyyyyy.corp.xxxxx.com (8.14.4/8.14.4) with ESMTP id r976Zj9U052069
    for <podsdev@yyyyyyyy.corp.xxxxx.com>; Sun, 6 Oct 2013 23:35:45 -0700
Received: from xxxxxxxxxxx.sv2.corp.xxxxx.com (localhost )
    by xxxxxxxxxxx.sv2.corp.xxxxx.com (8.14.4/8.14.4) with ESMTP id r976ZjNb023680
    for <podsdev@yyyyyyyy.corp.xxxxx.com>; Sun, 6 Oct 2013 23:35:45 -0700
Received: (from root@localhost)
    by xxxxxxxxxxx.sv2.corp.xxxxx.com (8.14.4/8.14.4/Submit) id r976Zj98023679
    for podsdev@yyyyyyyy.corp.xxxxx.com; Sun, 6 Oct 2013 23:35:45 -0700
Received: from DSV2LXODSINXXXFO01.localdomain ()
    by xxxxxxxxxxx.sv2.corp.xxxxx.com (8.14.4/8.14.4) with ESMTP id r976ZjOe023673
    for <allsiebeldev@xxxxx.com>; Sun, 6 Oct 2013 23:35:45 -0700
Received: from DLXODSINXXXFO01.corp.xxxxx.com (localhost )
    by DLXODSINXXXFO01.localdomain (Postfix) with ESMTP id 7D0B61FF87
    for <allsiebeldev@xxxxx.com>; Mon,  7 Oct 2013 06:35:45 +0000 (GMT)
Received: (from gdev@localhost)
    by DLXODSINXXXFO01.corp.xxxxx.com (8.14.4/8.14.4/Submit) with UUCP id r976Zjpp012068
    for allsiebeldev@xxxxx.com; Mon, 7 Oct 2013 06:35:45 GMT
Date: Mon, 7 Oct 2013 06:35:45 GMT
From: GDEV User <gdev@DSV2LXODSINXXXFO01.corp.xxxxx.com>
Message-Id: <201310070635.r976Zjpp012068@DSV2LXODSINXXXFO01.corp.xxxxx.com>
To: allsiebeldev@xxxxx.com
Subject: Failed: ODS_ETL_PARAM_SessionSmiley SadSample format)
MIME-Version: 1.0
Content-Type: multipart/mixed;
  boundary=_Next_Part_1381127745
--_Next_Part_1381127745
Content-Type: text/plain; charset=UTF-8
 
Integration Service Name :  INFA_INTG_SERV_ODS_DEV
Repository Name:  INFA_REP_SERV_ODS_DEV 
Folder Name: EQIX_ODS_SIL 
Workflow Name :  WF_EMAIL_TEST
Session Name:  s_EQIX_ORA_ODS_Param_File_Generate 
Session  Start Time: Mon Oct 07 06:35:44 2013 
Session  Completion Time: Mon Oct 07 06:35:45 2013
Total Records Loaded: Total Rows Loaded = 0 
Total Records Rejected: Total Rows Rejected = 0 
Session Status: Failed
--_Next_Part_1381127745
Content-Type: text/plain
Content-Disposition: attachment;
  filename=s_EQIX_ORA_ODS_Param_File_Generate_1381127745.log
Content-Description: s_EQIX_ORA_ODS_Param_File_Generate_1381127745.log
Mon Oct 07 06:35:44 2013 : DIRECTOR> TM_6014 Initializing session at .
Mon Oct 07 06:35:44 2013 : DIRECTOR> TM_6683 Repository Name:
Mon Oct 07 06:35:44 2013 : DIRECTOR> TM_6684 Server Name:
Mon Oct 07 06:35:44 2013 : DIRECTOR> TM_6686 Folder:
Mon Oct 07 06:35:44 2013 : DIRECTOR> TM_6685 Workflow: Run Instance Name: [] Run Id:
Mon Oct 07 06:35:44 2013 : DIRECTOR> TM_6101 Mapping name: EQIX_ORA_ODS_Param_File_Generate .
Mon Oct 07 06:35:44 2013 : DIRECTOR> TM_6964 Date format for the Session is
Mon Oct 07 06:35:44 2013 : DIRECTOR> TM_6703 Session is run by 64-bit Integration Service  , version , build .
Mon Oct 07 06:35:44 2013 : MANAGER> PETL_24058 Running Partition Group .
Mon Oct 07 06:35:44 2013 : MANAGER> PETL_24000 Parallel Pipeline Engine initializing.
Mon Oct 07 06:35:44 2013 : MANAGER> PETL_24001 Parallel Pipeline Engine running.
Mon Oct 07 06:35:44 2013 : MANAGER> PETL_24003 Initializing session run.
Mon Oct 07 06:35:44 2013 : MAPPING> CMN_1569 Server Mode:
Mon Oct 07 06:35:44 2013 : MAPPING> CMN_1570 Server Code page:
Mon Oct 07 06:35:44 2013 : MAPPING> TM_6151 The session sort order is .
Mon Oct 07 06:35:44 2013 : MAPPING> TM_6156 Using low precision processing.
Mon Oct 07 06:35:44 2013 : MAPPING> TM_6180 Deadlock retry logic will not be implemented.
Mon Oct 07 06:35:44 2013 : MAPPING> TM_6187 Session target-based commit interval is .
Mon Oct 07 06:35:44 2013 : MAPPING> TM_6307 DTM error log disabled.
Mon Oct 07 06:35:44 2013 : MAPPING> TE_7022 TShmWriter: Initialized
Mon Oct 07 06:35:44 2013 : MAPPING> TE_7004 Transformation Parse Warning ; transformation continues...
Mon Oct 07 06:35:44 2013 : MAPPING> TE_7004 Transformation Parse Warning : operand converted to a string
... IIF(SUBSTR(TO_CHAR(SESSION_SEQ),LENGTH(>>>>SESSION_SEQ<<<<),1)='2',LTRIM(RTRIM(TO_CHAR(TO_DATE(ATTRIBUTE_VALUE,'MM/DD/YYYY HH24:MISmiley FrustratedS'),'MM/DD/YYYY HH24:MISmiley FrustratedS'))),ATTRIBUTE_VALUE)]; transformation continues...
Mon Oct 07 06:35:44 2013 : MAPPING> TE_7004 Transformation Parse Warning ; transformation continues...
Mon Oct 07 06:35:44 2013 : MAPPING> TE_7004 Transformation Parse Warning : operand converted to a string
... DECODE(
         SUBSTR(TO_CHAR(SESSION_SEQ),LENGTH(>>>>SESSION_SEQ<<<<),1),
         '1',SESSION_NAME||chr(10)||CHR(10)||ATTRIBUTE_NAME||'='||ATTRIBUTE_VALUE||chr(10),
          '5',ATTRIBUTE_NAME||'='||ATTRIBUTE_VALUE||CHR(10)||CHR(10),
           ATTRIBUTE_NAME||'='||ATTRIBUTE_VALUE ||chr(10))
]; transformation continues...
Mon Oct 07 06:35:44 2013 : MAPPING> TM_6007 DTM initialized successfully for session
Mon Oct 07 06:35:44 2013 : DIRECTOR> PETL_24033 All DTM Connection Info: .
Mon Oct 07 06:35:44 2013 : MANAGER> PETL_24004 PETL_24004 Starting pre-session tasks. : (Mon Oct 07 06:35:44 2013)
Mon Oct 07 06:35:44 2013 : MANAGER> PETL_24027 PETL_24027 Pre-session task completed successfully. : (Mon Oct 07 06:35:44 2013)
Mon Oct 07 06:35:44 2013 : DIRECTOR> PETL_24006 Starting data movement.
Mon Oct 07 06:35:44 2013 : MAPPING> TM_6660 Total Buffer Pool size is 12000000 bytes and Block size is 65536 bytes.
Mon Oct 07 06:35:44 2013 : MAPPING> TM_6780 TM_6780 Starting Pre SQL for source . : (Mon Oct 07 06:35:44 2013)
Mon Oct 07 06:35:44 2013 : MAPPING> TM_6272 Executing pre-session SQL for source: UPDATE ODS_ETL_PARAMS
set ETL_START_DATE=To_Char(SYSDATE,'MM/DD/YYYY HH24:MISmiley FrustratedS')
WHERE attribute_name = '$$LAST_EXTRACT_DATE' and  ODS_SOURCE IN ('UCM','CAPMGMT','CALEND-CRM');
COMMIT;.
Mon Oct 07 06:35:44 2013 : MAPPING> CMN_1022 Database driver error...
CMN_1022
Mon Oct 07 06:35:44 2013 : MANAGER> PETL_24005 PETL_24005 Starting post-session tasks. : (Mon Oct 07 06:35:44 2013)
Mon Oct 07 06:35:44 2013 : MANAGER> PETL_24029 PETL_24029 Post-session task completed successfully. : (Mon Oct 07 06:35:44 2013)
Mon Oct 07 06:35:44 2013 : MAPPING> TM_6018 The session completed with row transformation errors.
Mon Oct 07 06:35:45 2013 : MANAGER> PETL_24002 Parallel Pipeline Engine finished.
Mon Oct 07 06:35:45 2013 : DIRECTOR> PETL_24013 Session run completed with failure.
Mon Oct 07 06:35:45 2013 : DIRECTOR> TM_6022
SESSION LOAD SUMMARY
================================================
Mon Oct 07 06:35:45 2013 : DIRECTOR> TM_6252 Source Load Summary.
Mon Oct 07 06:35:45 2013 : DIRECTOR> CMN_1740 Table: (Instance Name: )
     Output Rows , Affected Rows , Applied Rows , Rejected Rows
Mon Oct 07 06:35:45 2013 : DIRECTOR> TM_6253 Target Load Summary.
Mon Oct 07 06:35:45 2013 : DIRECTOR> CMN_1740 Table: (Instance Name: )
     Output Rows , Affected Rows , Applied Rows , Rejected Rows
Mon Oct 07 06:35:45 2013 : DIRECTOR> TM_6023
===================================================
Mon Oct 07 06:35:45 2013 : DIRECTOR> TM_6020 Session completed at .

--_Next_Part_1381127745--
One Star

Re: IMAP Email attachments are not able load to mongodb

Hello,
Is there an update on this? Even I am getting a NULL output in the tLogRow when I try to fetch the attachments from a mail file. The attachment gets downloaded on to the local directory though, but I can't extract any information.
Thanks,
Dhruv