Search code examples
hadoophivehue

How to change the column type in Hue of a hive table?


I'm trying to create a hive table manually, however I want to change the column type of "order" into an array with a structure (orderline).

My current table is as follows:

enter image description here

I want to have the same type as orders:

enter image description here

How can I change the type of a column?


Solution

  • I figured it out, could just edit the types through the hive query editor, with simple SQL statements like:

    ALTER TABLE person CHANGE orders order ARRAY<STRUCT<status:string,creation_date:string,orderlines:array<STRUCT<depature_date:string,return_date : string, travel_days : int, creation_date: string,
                       price : int, booking_class : string, airline_code : string,
                       psg_gender : string, psg_lastname : string, psg_firstname : string, psg_dob : string>>>>
    

    Result: enter image description here