Hitachi Vantara Pentaho Community Forums
Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Pdi

  1. #1
    Join Date
    Jul 2012
    Posts
    200

    Default Pdi

    How to read ascii file using pentaho Data integration???

    We should convert ascii to text ??

  2. #2
    Join Date
    Apr 2008
    Posts
    1,771

    Default

    ascii files ARE text files.
    To be precise, ASCII is a "character encoding scheme":
    http://en.wikipedia.org/wiki/ASCII

    Text files can be created using ASCII, Unicode and other encoding scheme.

    Mick

  3. #3
    Join Date
    Jul 2012
    Posts
    200

    Default

    Hi

    Actually the file content is in ascii codes it has to be decoded in normal text how can we do this approach in Pentaho Data Integration..

    Quote Originally Posted by Mick_data View Post
    ascii files ARE text files.
    To be precise, ASCII is a "character encoding scheme":
    http://en.wikipedia.org/wiki/ASCII

    Text files can be created using ASCII, Unicode and other encoding scheme.

    Mick

  4. #4
    Join Date
    Mar 2008
    Posts
    140

    Default

    A understand Mick_data and agree that his response answers your question perfectly.

    What format is your text file in (CSV, Fixed Width, non-formatted)?
    What do you want to do with the contents of the file (Move to a database, analyze contents, convert format)?

    EDIT:
    In case there is any confusion over this, I can elaborate to say that PDI can read ASCII just fine, no conversion to another character encoding is necessary.
    Furthermore PDI can work with pretty much any character encoding that Java supports.
    Last edited by cboyden; 07-18-2012 at 11:09 AM.

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

    Default

    If I get it right, yvkumar has a text file containing code values, e.g. decimal "48" representing ASCII "0"
    Perhaps he/she has hex or base64 encoded text.
    Last edited by marabu; 07-18-2012 at 01:28 PM.
    So long, and thanks for all the fish.

  6. #6
    Join Date
    Jul 2012
    Posts
    200

    Default

    Yes correct.. The content will be of what u have shown in the example the file content contains ASCII values and we need to replace with characters ...

    Eg;- Ascii "0"---> text "48"

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

    Default

    Tell a bit more, please.

    Is it always the same number of codes in one line?
    Is there a separator, e.g. a single white space character?
    Or are the code values left padded with zeroes?
    Can you provide an exact description or a sample file?
    So long, and thanks for all the fish.

  8. #8
    Join Date
    Jul 2012
    Posts
    200

    Default

    Hi

    Please see the file attached for your reference . Is it the right ASCII file format ?
    If yes, how can I parse using kettle ?
    Thanks a lot for your time

    Quote Originally Posted by marabu View Post
    Tell a bit more, please.

    Is it always the same number of codes in one line?
    Is there a separator, e.g. a single white space character?
    Or are the code values left padded with zeroes?
    Can you provide an exact description or a sample file?
    Last edited by yvkumar; 07-23-2012 at 10:38 AM.

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

    Default

    The file looks just like an ordinary text file with fixed length fields.
    Since the record types (A,B,Z) don't have the same structure you can't simply use the Text file input step and be done, though.
    So long, and thanks for all the fish.

  10. #10

    Default

    Hello marabu,

    If the file has a structure, can the text file input be able to do the ASCII conversion ? (using US-ASCII as the encoding type, correct me if I am wrong)
    Can you please share a sample structured ASCII file ?

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.