Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: Email transformation step and attachments.

  1. #1
    Join Date
    Feb 2011
    Posts
    27

    Default Email transformation step and attachments.

    My goal is to create dynamic emails that for each row would send a different set of attachments.

    so for example:
    - for source row TOM - I would send email with 2 files attached, lets say c:\temp\tom1.txt and c:\temp\tom2.pdf
    - for source row JERZY - I would send email with just one file attached - c:\temp\jerzy\test.txt
    and so on.

    I have been trying to utilize the "send Mail" transformation step and the "dynamic filenames" attachment section, but cannot make it work to identify and attach just 2 out of many files in the folder.
    Tried different regular expression, but it either sends everything in a folder - or no attachments at all.

    Does anyone know how to set that up or has examples of this working?

    Please help - I could not find any existing answers or samples. !!!!

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    You did everything right but the regular expressions, it seems.
    So give the filenames you want to match, show your regex, and we will tell you what to change.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Feb 2011
    Posts
    27

    Default

    Thanks
    See the screenshot of the step
    eName:  send_mail.jpg
Views: 1143
Size:  27.0 KB

    In previous step, based on source data I specify the "filenames" element as subdirectory (example 'c:\temp\jerzy' or 'c:\news\today' )
    The wildard field "file_regex" is where I wanted to identify the individual files within that subdirectory.
    Example of what I tried would be:
    '\b(1.txt|2.rtf)\b'
    or
    '1.txt|2.rtf'
    etc. the goal is to specify one to 5 individual filenames out of several hundred that can be contained within the specified subdirectory.

    Your help will be greatly appreciated. Wish there were some documentation on it.

  4. #4
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Could be a bug.
    I tried to pick one out of three files and all three files where attached.
    I will check the source code ASAP.
    Maybe, someone else can verify this, too.
    So long, and thanks for all the fish.

  5. #5
    Join Date
    Feb 2011
    Posts
    27

    Default

    Any news Marabu?

  6. #6
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    It's a bug, here's a workaround to enable dynamic wildcards:

    • Open the Mail step dialog
    • Go to page "Attached files"
    • Turn off "Dynamic filenames?"
    • Enter marabu in field "Wildcard"
    • Turn on Dynamic filenames?" again

    Now, the regex in the input field configured in the dialog field "Wildcard field" will be used to select the files to attach.


    Quote Originally Posted by jerzy_s View Post
    Any news Marabu?
    Don't call us, we call you!

    This is community support.
    If you need a certain service level, you should sign a support contract with Pentaho.
    Last edited by marabu; 06-01-2013 at 05:29 AM.
    So long, and thanks for all the fish.

  7. #7
    Join Date
    Feb 2011
    Posts
    27

    Default

    It works! Woohoo!
    Thanks a MILLION ! (and sorry to have nagged - should have known better )

Tags for this Thread

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.