Home Forums Hortonworks Sandbox import flat file fixed size with dictionary template

This topic contains 2 replies, has 2 voices, and was last updated by  felipe oliveira 10 months, 3 weeks ago.

  • Creator
    Topic
  • #26901

    Hi guys,

    I have a flat file with fixed size and another file(metadata template) that says what are the size of each column and the corresponding description of each item in the flat file. What is the best way to import it into hadoop in the sandbox? transform it in a single csv file? Is there an easy way to do that?
    Exemple of my flat file would be:
    code,name,profession
    001FELIPE001
    002JACK 002

    Example of my metadata template file:

    code:size:1
    name:size:6
    profession:size:3
    001 – Student
    002 – Information Tecnology Analyst

    Note that in the flat file where profession is 001 is actual Student and 002 is Information Tecnology Analyst

    Thanks in Advanced.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

  • Author
    Replies
  • #26912

    Yes, i will import into a table.

    Collapse
    #26908

    Carter Shanklin
    Participant

    To clarify, are you looking to import this into a table? If so your best bet is to convert it to CSV. If the file is not too big you can do that in Excel or you can use a scripting language.

    Collapse
Viewing 2 replies - 1 through 2 (of 2 total)