Hive Select Into

hive, hiveql

Solution

You can use create table tablename as in Hive.

example:

create table people1990 as select * from people where dob_year=1990 

Problem

I have a database people in hive. It's schema is as follows: ``` name string, dob_date int, dob_month int, dob_year int. ``` I have successfully loaded data from a file into the database. Now I want to have people having `dob_year=1990` into a new table. The following code doesn't work : ``` Select * into people1990 from people where dob_year=1990; ```

Original source