import flat file fixed size with dictionary template

This topic contains 2 replies, has 2 voices, and was last updated by  felipe oliveira 1 year, 9 months 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 to reply to this topic. | Create Account

  • 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)
Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.