Tuesday, November 16, 2010

How to copy a table in Hive to another table or create temp table

If you want to store results of a query in a table in Hive then

Create a schema of the temp table using command
CREATE TABLE ..

Execute the following command
INSERT OVERWRITE TABLE temp_tablename SELECT * FROM table_name

No comments:

Post a Comment