RE: How to get a flat file out of a table in Hive

2012-03-07 Thread hezhiqiang (Ransom)
you can create table as select first, use comma separated. Then export it. Best regards Ransom. From: Omer, Farah [mailto:fo...@microstrategy.com] Sent: Wednesday, March 07, 2012 12:32 AM To: user@hive.apache.org Subject: How to get a flat file out of a table in Hive Whats the easiest way to

Re: How to get a flat file out of a table in Hive

2012-03-06 Thread Jonathan Seidman
Farah – The easiest way to dump data to a file is with a query like the following: hive> INSERT OVERWRITE LOCAL DIRECTORY 'DIRECTORY_NAME' SELECT * from TABLE_NAME; The drawback of this is that Hive uses ^A as the separator by default. In the past what I found easiest was to just run a simple sed

How to get a flat file out of a table in Hive

2012-03-06 Thread Omer, Farah
Whats the easiest way to get a flat file out from a table in Hive? I have a table in HIVE, that has millions of rows. I want to get a dump of this table out in flat file format, and it should be comma separated. Anyone knows the syntax to do it? Thanks for the help! Farah Omer Senior DB Engin