19

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;
Luc M
  • 16,630
  • 26
  • 74
  • 89
Nemil A Timbadia
  • 319
  • 1
  • 3
  • 6

1 Answers1

33

You can use create table tablename as in Hive.

example:

create table people1990 as select * from people where dob_year=1990 
Balaswamy Vaddeman
  • 8,360
  • 3
  • 30
  • 40