Hadoop DP Notes
Home
Contact Us
Search
How can we change a column data type in Hive?
We can use below command to alter data type of a column in hive.
Shell
ALTER TABLE table_name CHANGE column_name column_name new_datatype;
Example:
If we want to change the data type of
empid
column from integer to bigint in a
table called employee.
Shell
ALTER TABLE employee CHANGE empid empid BIGINT;
Newer Post
Older Post
Home
What are the main components of Mapreduce Job ?
Main driver class which provides job configuration parameters. Mapper class which must extend org.apache.hadoop.mapredu...
TO_CHAR
This will be used to extract various date formats. The available date formats as follows. Syntax: to_char ( date , fo...