Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Return only one part of .txt

  1. #1
    Join Date
    Jun 2017
    Posts
    29

    Question Return only one part of .txt

    Hello!



    I want to take only a part of .txt, its possible?

    For example, i want just the three lines in the image:






    Remember that in .txt the lines will not always be in the same position.

    Someone can help?



    Thanks!

  2. #2
    Join Date
    May 2016
    Posts
    280

    Default

    What is the pattern/logic to get the lines? Get lines 12, 13 and 14 whatever their content? Get lines when there is more than one consecutive non-empty line?
    OS: Ubuntu 16.04 64 bits
    Java: Openjdk 1.8.0_131
    Pentaho 6.1 CE

  3. #3
    Join Date
    Jun 2017
    Posts
    29

    Default

    Quote Originally Posted by Ana GH View Post
    What is the pattern/logic to get the lines? Get lines 12, 13 and 14 whatever their content? Get lines when there is more than one consecutive non-empty line?
    Hello Ana,

    In my case, after using the "Get Mail from POP" step to return a message, I need to "catch" only the part where the attachment is (base64 encoded).
    For some reasons the step of the PDI can not return the attachment of the message (I believe it to be in MIME Type).
    Anyway, I would like to just pick the part where it matches the attachment, because after getting this information I can decode to the format I want (in my case .CSV).

    Image for example: https://ibb.co/jBvAoy

    Thanks for help!
    Last edited by lucas.turco; 05-17-2018 at 07:52 AM. Reason: forgot image

  4. #4
    Join Date
    Apr 2008
    Posts
    4,690

    Default

    Assuming that this is basically a continuation of https://forums.pentaho.com/threads/2...ent-MIME-Type/

    One thing to understand is that an attachment and an embedded document are not the same thing at the email level.

    The next thing is to understand is that in an email, the sections are usually broken by the string ----boundary
    So you can isolate the sections of the email based on that string, and process each section.

    The root reason that you're not getting a lot of help is that it's very difficult for someone to try to help when you're working on something that is so specific to your case that they can't replicate it.

  5. #5
    Join Date
    Jun 2017
    Posts
    29

    Default

    Quote Originally Posted by gutlez View Post
    Assuming that this is basically a continuation of https://forums.pentaho.com/threads/2...ent-MIME-Type/

    One thing to understand is that an attachment and an embedded document are not the same thing at the email level.

    The next thing is to understand is that in an email, the sections are usually broken by the string ----boundary
    So you can isolate the sections of the email based on that string, and process each section.

    The root reason that you're not getting a lot of help is that it's very difficult for someone to try to help when you're working on something that is so specific to your case that they can't replicate it.
    Its a continuation, though, its a contouring solution. heheh
    FOr me its not a problem to send the file (witch the body of the e-mail with the base64 attachment) by removing confidential parts.
    If you wanted the file, just ask me to send it here in the post.

    Quote Originally Posted by gutlez View Post
    So you can isolate the sections of the email based on that string, and process each section.
    How can i do that? Can you help?

    Thanks again!

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.