Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: How to remove undesired files from email attachment

  1. #1

    Question How to remove undesired files from email attachment

    Hi,

    Is it possible to remove a file from the input queue of a email job entry ?

    Scenario
    ------------
    1. I have got a job that reads csv files and writes output csv files (one at a time).
    2. If the input files are processed successfully then the input files are archived.
    3. On completion if there is an error then a email is send with the error logs.

    Undesired Result
    -----------------------
    When an error email is send it has the output files also attached to the email. I am expecting only the error logs! Is there a way to prevent the output files from the queue.

    Regards
    Biju

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    There's an option in the mail entry telling it which files to take. If you split up the mail into 2 mails, 1 on success using the errorlog and 1 on failure only using the error I think it should work ... YMMV.

    Regards,
    Sven

  3. #3

    Default

    The issue is not with the error log files being attached.

    The issue is that all output files generated by any previous steps/job entries are attached to the email. There is no feature in the email component to say what should be attached and what should not. (in addition to the log file).

    Again if we uncheck the "Attach log files to message" option, even the files placed in the input queue of the email component are not attached.

    Regards
    Biju

  4. #4
    Join Date
    May 2006
    Posts
    4,882

    Default

    Quote Originally Posted by bijugv View Post
    The issue is that all output files generated by any previous steps/job entries are attached to the email. There is no feature in the email component to say what should be attached and what should not. (in addition to the log file).
    Below the "attach log files" you can choose which type of file you like to attach. You now have selected "general" to pick any file, change it on the error branch. Disadvantage: you have 2 mail job entries: 1 for success, 1 for failure

    Regards,
    Sven
    Last edited by sboden; 07-16-2007 at 06:03 AM.

  5. #5

    Unhappy

    The below screenshot will make my situation more clear.

    There is only one email component as i require it only to inform failures. Currently i get an email with :
    1. error.zip
    2. all the logs
    3. output.csv ???
    Attached Images Attached Images  

  6. #6

    Thumbs up Re: Regarding CRQ# 5836

    Quote Originally Posted by shassan2
    Hi Biju,

    You reach a good point :-)
    Today, output files steps (excel output, text file output) & zip job entry "add" files to their results allowing email job entry to attach their files to mail message.

    You can't choose which file to attach to mail !
    I started to add an option "add file to result" to new steps. It works.

    But maybe it will be good to built a desired list (or/and a undesired list) of files to attached at mail job entry level.

    This issue deserve to be discussed so you can feel a CRQ.

    Thanks

    Samatar
    Thanks Samatar for your quick action on CRQ# 5836 ( new feature : Add filename to Result").

    I did some test on the "zip job entry" and can confirm that it is working as expected. I guess the same approach needs to be done on all the other output steps (excel, text, .... ) at some point in time.

    Regards
    Biju.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.