You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Sh...@cognizant.com on 2011/09/16 12:42:45 UTC
Output in csv format
Hi ,
I want my reducer output to be dumped into a csv file, How can that be
done?
Or can we convert part-000 to a csv ?
hadoop fs -cat /some/where/on/hdfs/job-output/part-* >
TheCombinedResultOfTheJob.csv
This doesn't work I get only the first column in csv file.
Regards,
Shreya Pal
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful.
Re: Output in csv format
Posted by Harsh J <ha...@cloudera.com>.
Shreya,
Assuming your file output was already CSV (i.e. your job wrote it as so),
you can get a merged file via:
hadoop dfs -getmerge /some/dir/of/multiple/files mergedfile.csv
On Fri, Sep 16, 2011 at 4:12 PM, <Sh...@cognizant.com> wrote:
> Hi ,****
>
> ** **
>
> I want my reducer output to be dumped into a csv file, How can that be
> done? ****
>
> Or can we convert part-000 to a csv ?****
>
> ** **
>
> hadoop fs -cat /some/where/on/hdfs/job-output/part-* >
> TheCombinedResultOfTheJob.csv****
>
> This doesn’t work I get only the first column in csv file.****
>
> ** **
>
> Regards,****
>
> Shreya Pal****
> This e-mail and any files transmitted with it are for the sole use of the
> intended recipient(s) and may contain confidential and privileged
> information. If you are not the intended recipient(s), please reply to the
> sender and destroy all copies of the original message. Any unauthorized
> review, use, disclosure, dissemination, forwarding, printing or copying of
> this email, and/or any action taken in reliance on the contents of this
> e-mail is strictly prohibited and may be unlawful.
>
--
Harsh J