Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Can the partition field type of the partition only be string when hive builds the table? Can I use other field types?
Can the partition field type of the partition only be string when hive builds the table? Can I use other field types?
Yes, you can specify according to your own needs! But in general, strings are used.

For example:

Use dw;

If xxxxx exists, delete the table;

Create table xxxxx (

Time string,

user_id int,

Keyword string

)

Note "Record Table"

Partition by (ds string, hour string, int type)

Store as a text file;