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;
hive SELECT Statement Select Specific Rows You can use the keyword RLIKE to use Java regular expressions. The following query will return rows which column name contains the words "smith" or "son". You can apply functions to the returned data. The following sentence will return all name in upper case.
You can use create table tablename as in Hive.
example:
create table people1990 as select * from people where dob_year=1990
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With