Topic
  • 4 replies
  • Latest Post - ‏2013-03-27T05:01:42Z by jayasamraj
SystemAdmin
SystemAdmin
603 Posts

Pinned topic JAQL (Conversion of text file to Json Record

‏2013-03-01T07:21:57Z |
Hi,

I have text file placed in HDFS. Now I want to convert the text file into json record. How can I do that? Can anyone help me out?
Updated on 2013-03-27T05:01:42Z at 2013-03-27T05:01:42Z by jayasamraj
  • D7NU_rohit_haritash
    D7NU_rohit_haritash
    16 Posts

    Re: JAQL (Conversion of text file to Json Record

    ‏2013-03-02T03:13:08Z  
    Just import the text file in big sheets. There is a option to export that data in different format . One of them is JSON.
  • KhandekarAkram
    KhandekarAkram
    14 Posts

    Re: JAQL (Conversion of text file to Json Record

    ‏2013-03-04T10:16:03Z  
    Just import the text file in big sheets. There is a option to export that data in different format . One of them is JSON.
    In BigSheets one can read a data in a format supported by the document itself. One cannnot convert a text file to JSON format.
    PFA the error when tried to import atext as JSON format. Rohit please correct me if I am wrong.

    Regars,
    Akram
  • SystemAdmin
    SystemAdmin
    603 Posts

    Re: JAQL (Conversion of text file to Json Record

    ‏2013-03-04T10:51:49Z  
    In BigSheets one can read a data in a format supported by the document itself. One cannnot convert a text file to JSON format.
    PFA the error when tried to import atext as JSON format. Rohit please correct me if I am wrong.

    Regars,
    Akram
    Same error displaying for me also.
    Can anyone suggest solution?
  • jayasamraj
    jayasamraj
    9 Posts

    Re: JAQL (Conversion of text file to Json Record

    ‏2013-03-27T05:01:42Z  
    Same error displaying for me also.
    Can anyone suggest solution?
    Hi,
    You can use with the help of,

    txtOutOpt = {format: "org.apache.hadoop.mapred.TextOutputFormat",
    converter: "com.ibm.jaql.io.hadoop.converter.ToJsonTextConverter"};