I am trying to create a new table with the existing table using Hive query.
While creating a new table I want to add a new column and insert current timestamp for all the rows.
For example:
Exiting table:
|user_id|user_name|user_address|
|1001 |userName |address |
New table:
|user_id|user_name|user_address|creation_date|
|1001 |userName |address | 123421342134|
I am trying to execute this query using JDBCTemplate.
What I have tried:
Create table newTable Select * from existingtable;
But that would copy create new table with old values, I want to add new column and insert values during the table creation.
Please help.